psql line number reporting from stdin

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема psql line number reporting from stdin
Дата
Msg-id 1322339775.8179.6.camel@vanquo.pezone.net
обсуждение исходный текст
Ответы Re: psql line number reporting from stdin  (Robert Haas <robertmhaas@gmail.com>)
Re: psql line number reporting from stdin  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: psql line number reporting from stdin  (Nathan Wagner <nw@hydaspes.if.org>)
Re: psql line number reporting from stdin  (Peter Eisentraut <peter_e@gmx.net>)
Re: psql line number reporting from stdin  (Peter Eisentraut <peter_e@gmx.net>)
Список 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.

Вложения

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

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