On lör, 2011-11-26 at 22:36 +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"
The problem is, this breaks the regression tests, because first the
actual output changes, and second the line numbers get included, which
will create a mess every time you edit a test. Not sure whether we can
work around that. Ideas?