From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | psql line number reporting from stdin |
Date: | 2011-11-26 20:36:15 |
Message-ID: | 1322339775.8179.6.camel@vanquo.pezone.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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.
Attachment | Content-Type | Size |
---|---|---|
psql-stdin-lineno.patch | text/x-patch | 498 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2011-11-26 20:42:12 | Re: Avoiding repeated snapshot computation |
Previous Message | Andrew Dunstan | 2011-11-26 20:28:57 | Re: Patch: Perl xsubpp |