| From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
|---|---|
| To: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | [PATCH] Make "psql -1 < file.sql" work as with "-f" |
| Date: | 2012-08-01 08:28:09 |
| Message-ID: | alpine.DEB.2.02.1208011017100.11104@localhost6.localdomain6 |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Dear PostgreSQL developers,
Plese find attached a patch so that:
Make "psql -1 < file.sql" work as with "-f"
Make psql --single-transaction option work on a non-interactive
standard input as well, so that "psql -1 < input.sql" behaves as
"psql -1 -f input.sql".
This saner/less error-prone behavior was discussed in this thread back in
June:
http://archives.postgresql.org/pgsql-hackers/2012-06/msg00785.php
I have tested it manually and it works for me. I'm not sure this is the
best possible implementation, but it is a small diff one. I haven't found
a place in the regression tests where "psql" could be tested with
different options. Did I miss something?
--
Fabien.
| Attachment | Content-Type | Size |
|---|---|---|
| single_txn_on_no_tty_stdin.patch | text/x-diff | 3.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amit Kapila | 2012-08-01 12:59:01 | Re: Fixing syslogger rotation logic for first-time case |
| Previous Message | Hugo <Nabble> | 2012-08-01 05:33:04 | Re: pg_dump and thousands of schemas |