Skip site navigation (1) Skip section navigation (2)

Re: psql line number reporting from stdin

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql line number reporting from stdin
Date: 2011-12-03 17:27:32
Message-ID: (view raw or whole thread)
Lists: 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"

It turns out that running

psql -f -

already used to print

psql:<stdin>:1: ERROR:  blah

except that it got broken between 8.4 and 9.0 (commit b291c0fb), and now

psql:-:1: ERROR:  blah

I'll try to find a way to fix that and integrate it with the change I'm

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2011-12-03 17:53:19
Subject: Re: why local_preload_libraries does require a separate directory ?
Previous:From: Heikki LinnakangasDate: 2011-12-03 16:37:14
Subject: Re: Bug in walsender when calling out to do_pg_stop_backup (and others?)

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group