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 pete...@gmx.net 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

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 does not. I

Re: [HACKERS] psql line number reporting from stdin

2011-12-09 Thread Tom Lane
Peter Eisentraut pete...@gmx.net 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

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 does not. I

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 pete...@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

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 robertmh...@gmail.com wrote: On Sat, Nov 26, 2011 at 3:36 PM, Peter Eisentraut pete...@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

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 singh.gurj...@gmail.com 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

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 robertmh...@gmail.com wrote: On Mon, Nov 28, 2011 at 8:49 AM, Gurjeet Singh singh.gurj...@gmail.com wrote: Naysayers can always make a case Should've added that I'm not one of them :) +1 from me on the improvement. for

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 psql

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 we

[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:stdin:1: ERROR: syntax error