On Sat, 26 Nov 2011 22:36:15 +0200, Peter Eisentraut wrote:
There is a long-standing oddity in psql that running

psql -f foo.sql

returns error messages with file name and line number, like

psql:foo.sql:1: ERROR:  syntax error at or near "foo"

but running

psql < foo.sql does not.  I suggest we change the latter to print

psql:<stdin>:1: ERROR:  syntax error at or near "foo"

Other examples for the use of the spelling "<stdin>" in this context
include gcc and slonik.

Error messages printed in interactive mode will not be affected, of
course.

Patch attached.

No issue with the change itself, but the docs claim
that

"the variant using the shell's input redirection is
(in theory) guaranteed to yield exactly the same output
you would have received had you entered everything by hand."

--
nw

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to