| From: | Jay Levitt <jay(dot)levitt(at)gmail(dot)com> | 
|---|---|
| To: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> | 
| Subject: | psql -1 with multiple files? | 
| Date: | 2011-12-01 22:01:08 | 
| Message-ID: | 4ED7F924.7060103@gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
Is there a way to load multiple .sql files in a single transaction? It looks 
like "psql -f file1 -f file2" or "psql -f file*" was a WIP patch that never 
happened, and from what I can tell, psql ignores the -1 parameter when 
reading from STDIN, so I can't cat them together either:
$ cat > am_i_in_transaction.sql
set client_min_messages to debug;
abort;
set client_min_messages to debug;
^D
$ psql -1 -f am_i_in_transaction.sql
SET
ROLLBACK
SET
psql:am_i_in_transaction.sql:0: WARNING:  there is no transaction in progress
$ psql -1 < am_i_in_transaction.sql
SET
NOTICE:  there is no transaction in progress
ROLLBACK
SET
$ psql -1 -f am_i_in_transaction.sql -f am_i_in_transaction.sql
SET
ROLLBACK
SET
psql:am_i_in_transaction.sql:0: WARNING:  there is no transaction in progress
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Steve Crawford | 2011-12-01 23:28:55 | Re: psql -1 with multiple files? | 
| Previous Message | David Johnston | 2011-12-01 21:57:59 | Re: returning rows from an implicit JOIN where results either exist in both tables OR only one table |