Re: psql misbehaves because of a simple typo - Mailing list pgsql-hackers

From Tom Lane
Subject Re: psql misbehaves because of a simple typo
Date
Msg-id 21089.1007306172@sss.pgh.pa.us
Whole thread Raw
In response to psql misbehaves because of a simple typo  ("Serguei Mokhov" <sa_mokho@alcor.concordia.ca>)
Responses Re: psql misbehaves because of a simple typo  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
"Serguei Mokhov" <sa_mokho@alcor.concordia.ca> writes:
> Is it me (who hasn't read some FAQ or a doc/man page) or
> it's a bug in the psql interactive terminal?

Both.  There's a bug there, but it's not the one you think.
psql seems to forget that it's got unmatched parentheses in the
buffer after executing a \? command.  Watch the prompt:

regression=# (select
regression(# \?... yadda yadda ...
regression-# 2;
ERROR:  parser: parse error at or near ";"
regression=# (select
regression(# \?... yadda yadda ...
regression-# 2);?column?
----------       2
(1 row)

In the first example, it should not have thought that it had
a complete command after "2;".
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Yet more logging questions
Next
From: mlw
Date:
Subject: Re: Yet more logging questions