Re: psql line number reporting from stdin

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: psql line number reporting from stdin
Дата
Msg-id CA+Tgmoag7W4XceEuFmGsA8G3v=bRnJH3uhEO76_Msk0PD7NNLQ@mail.gmail.com
обсуждение исходный текст
Ответ на psql line number reporting from stdin  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: psql line number reporting from stdin
Список pgsql-hackers
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


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Patch: Perl xsubpp
Следующее
От: Robert Haas
Дата:
Сообщение: Re: odbc_fdw