Put this into *scratch*, and eval-buffer: (setq sql-postgres-options (list "-Ums_analysis")) Then run this command: sql-postgres