Re: [HACKERS] psql line number reporting from stdin

2011-12-10 Thread Peter Eisentraut
On fre, 2011-12-09 at 13:44 -0500, Tom Lane wrote: > Peter Eisentraut writes: > > 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 c

Re: [HACKERS] psql line number reporting from stdin

2011-12-09 Thread Tom Lane
Peter Eisentraut writes: > 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? Ugh, that's pretty nearly a

Re: [HACKERS] psql line number reporting from stdin

2011-12-09 Thread Peter Eisentraut
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 doe

Re: [HACKERS] psql line number reporting from stdin

2011-12-03 Thread Peter Eisentraut
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 doe

Re: [HACKERS] psql line number reporting from stdin

2011-11-28 Thread Nathan Wagner
On Sat, 26 Nov 2011 22:36:15 +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 w

Re: [HACKERS] psql line number reporting from stdin

2011-11-28 Thread Alvaro Herrera
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 > >

Re: [HACKERS] psql line number reporting from stdin

2011-11-28 Thread Gurjeet Singh
On Mon, Nov 28, 2011 at 8:55 AM, Robert Haas wrote: > On Mon, Nov 28, 2011 at 8:49 AM, Gurjeet Singh > wrote: > > Naysayers can always make a case > Should've added that I'm not one of them :) +1 from me on the improvement. > for backwards-compatibility, or not > > breaking the scripts writt

Re: [HACKERS] psql line number reporting from stdin

2011-11-28 Thread Robert Haas
On Mon, Nov 28, 2011 at 8:49 AM, Gurjeet Singh wrote: > Naysayers can always make a case for backwards-compatibility, or not > breaking the scripts written with the existing behaviour in mind. I'm having a hard time imagining how this could break anything. What scenario did you have in mind? >

Re: [HACKERS] psql line number reporting from stdin

2011-11-28 Thread Gurjeet Singh
On Mon, Nov 28, 2011 at 8:10 AM, Robert Haas wrote: > On Sat, Nov 26, 2011 at 3:36 PM, 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: synt

Re: [HACKERS] psql line number reporting from stdin

2011-11-28 Thread Robert Haas
On Sat, Nov 26, 2011 at 3:36 PM, 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.

[HACKERS] psql line number reporting from stdin

2011-11-26 Thread Peter Eisentraut
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::1: ERROR: syntax error at