Re: psql line number reporting from stdin
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2011-11-28T13:10:46Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
psql -f -
- b291c0fba83a 9.0.0 cited
On Sat, Nov 26, 2011 at 3:36 PM, Peter Eisentraut <peter_e@gmx.net> 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. Seems like a good idea to me. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company