Re: BUG #2177: (minor:) pgsql: Trailing semicolon on \d treated as argument - Mailing list pgsql-bugs

From Giles Morant
Subject Re: BUG #2177: (minor:) pgsql: Trailing semicolon on \d treated as argument
Date
Msg-id 157e68000601210425jfe9bdf0mcca6f0daa9951ada@mail.gmail.com
Whole thread Raw
In response to Re: BUG #2177: (minor:) pgsql: Trailing semicolon on \d treated  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: BUG #2177: (minor:) pgsql: Trailing semicolon on \d treated
List pgsql-bugs
I agree we cannot just throw the semi-colon away, but the action of
"\d" to assume the semi-colon is an argument and thus invalid is in my
view wrong.

On 1/19/06, Bruce Momjian <pgman@candle.pha.pa.us> wrote:
>
> We can't just throw away semicolons, e.g.:
>
>         \test=3D> \f ;
>         Field separator is ";".
>
> The current behavior seems pretty good.  It doesn't seem worth
> improving.
>
> -------------------------------------------------------------------------=
--
>
> Giles Morant wrote:
> >
> > The following bug has been logged online:
> >
> > Bug reference:      2177
> > Logged by:          Giles Morant
> > Email address:      giles.pg@chaletpomme.com
> > PostgreSQL version: 8.1.1
> > Operating system:   Linux (Gentoo)
> > Description:        (minor:) pgsql: Trailing semicolon on \d treated as
> > argument
> > Details:
> >
> > When describing tables/view/indexes using \d, a semi-colon is optional:
> > e.g.  \d users;
> > or:   \d users
> > Both give the same (correct) results.
> >
> > However, if there is a space between "users" and the semi-colon, the
> > semi-colon is then treated as an argument and this occurs:
> >    \d users ;
> >    <cut lots of table info>
> >    \d: extra argument ";" ignored
> >
> > The semi-colon should be ignored silently, in my view- "SELECT 1+2 ;" f=
or
> > example doesn't raise an alert.
> >
> > I searched the mailing lists to find a previous report of this very min=
or
> > bug; the closest I found was some discussion in 2001 of stripping
> > semi-colons from the end of such strings but the discussion seemed to s=
top
> > with no resolution.
> >
> > http://archives.postgresql.org/pgsql-patches/2001-09/msg00285.php
> > Fri, 28 Sep 2001 15:56:07 -0400 (EDT)
> >
> > Thanks,
> > Giles Morant.
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 6: explain analyze is your friend
> >
>
> --
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 359-1001
>   +  If your life is a hard drive,     |  13 Roberts Road
>   +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19=
073
>

pgsql-bugs by date:

Previous
From: "Kris Senden"
Date:
Subject: BUG #2189: Prepared Statement is not parsed correctly
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #2189: Prepared Statement is not parsed correctly