psql line number reporting from stdin

Поиск
Список
Период
Сортировка
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.

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Patch: Perl xsubpp
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Avoiding repeated snapshot computation