Re: psql line number reporting from stdin

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: psql line number reporting from stdin
Дата
Msg-id 1322502178-sup-9320@alvh.no-ip.org
обсуждение исходный текст
Ответ на psql line number reporting from stdin  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Excerpts from Peter Eisentraut's message of sáb nov 26 17:36:15 -0300 2011:
> 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"

Not that I have ever used psql in this way, but this format is compatible
with Vim "quickfix" whereas the old one is not (not sure what Emacs
people would call this).  Presumably, this being useless with <stdin> as
a file name is the reason this wasn't implemented in the first place.

+1 on the change.

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: "David E. Wheeler"
Дата:
Сообщение: Re: Patch: Perl xsubpp
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Patch: add timing of buffer I/O requests