dbTalk Databases Forums  

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

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] BUG #2177: (minor:) pgsql: Trailing semicolon on \d treated in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] BUG #2177: (minor:) pgsql: Trailing semicolon on \d treated - 01-19-2006 , 03:56 PM







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:
Quote:
The following bug has been logged online:

Bug reference: 2177
Logged by: Giles Morant
Email address: giles.pg (AT) chaletpomme (DOT) 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 (AT) candle (DOT) 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 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
  #2  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] BUG #2177: (minor:) pgsql: Trailing semicolon on \d treated - 01-21-2006 , 11:30 AM






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

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


Quote:
On 1/19/06, Bruce Momjian <pgman (AT) candle (DOT) 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 (AT) chaletpomme (DOT) 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 (AT) candle (DOT) 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 (AT) candle (DOT) 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


Reply With Quote
  #3  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] BUG #2177: (minor:) pgsql: Trailing semicolon on \d treated - 01-21-2006 , 08:48 PM



Giles Morant wrote:
Quote:
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.
I didn't say what we are doing is right, I said fixing it would not be
worth it. If you want, submit a patch and we can decide.

Remember, \d can throw it away, but other backslash commands can not.

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


Quote:
On 1/19/06, Bruce Momjian <pgman (AT) candle (DOT) 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 (AT) chaletpomme (DOT) 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 (AT) candle (DOT) 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 4: Have you searched our list archives?

http://archives.postgresql.org

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) 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 4: Have you searched our list archives?

http://archives.postgresql.org


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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.