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-09 18:23:50
Message-ID: 1323455030.3451.1.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
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"

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?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2011-12-09 18:43:54 Re: Core Extensions relocation
Previous Message Andrew Dunstan 2011-12-09 18:12:59 Re: static or dynamic libpgport