Re: psql line number reporting from stdin

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: psql line number reporting from stdin
Дата
Msg-id 1323455030.3451.1.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на psql line number reporting from stdin  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: psql line number reporting from stdin  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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?




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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: static or dynamic libpgport
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Core Extensions relocation