Unix Technical Forum

Re: BUG #2177: (minor:) pgsql: Trailing semicolon on \d treated

This is a discussion on Re: BUG #2177: (minor:) pgsql: Trailing semicolon on \d treated within the pgsql Bugs forums, part of the PostgreSQL category; --> Giles Morant wrote: > I agree we cannot just throw the semi-colon away, but the action of > "\d" ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 09:40 AM
Bruce Momjian
 
Posts: n/a
Default Re: BUG #2177: (minor:) pgsql: Trailing semicolon on \d treated

Giles Morant wrote:
> 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.


True, but to fix it would require we know which backslash commands can
throw it away, and which cannot, and it doesn't seem worth the
effort/complexity.

---------------------------------------------------------------------------


>
> On 1/19/06, Bruce Momjian <pgman@candle.pha.pa.us> wrote:
> >
> > We can't just throw away semicolons, e.g.:
> >
> > \test=> \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 ;" for
> > > example doesn't raise an alert.
> > >
> > > I searched the mailing lists to find a previous report of this very minor
> > > 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 stop
> > > with no resolution.
> > >
> > > http://archives.postgresql.org/pgsql...9/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 19073
> >

>


--
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 19073

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:52 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com