";" no longer allowed to terminate a command beginning with "\"

Started by Sean Kellyalmost 26 years ago2 messagesbugs
Jump to latest
#1Sean Kelly
S.Kelly@newcastle.ac.uk

Hi there,

Just would like some "is this a bug or a feature"-style
clarification on this please.

In PostgreSQL v6.5 you used to be able to end a command issued to
"psql" starting with a backslash "\" with a semicolon ";", eg.

bookmarks=> \d sites_tbl;
Table = sites_tbl
...
TABLE HERE
...

However, in PostgreSQL v7.0.2, this does not happen, eg.

projman_dev=# \d login_tbl;
Did not find any relation named "login_tbl;".

[even though there _is_ a table called login_tbl]

I know that SQL statements end with a semi-colon, and I also know
that the backslashed commands are _not_ SQL statements. In my case, I
know I am used to ending almost everything I write with a semicolon but
was just wondering whether this was a planned change to the "psql"
application.

Thanks for your time,

--
Sean Kelly <S.Kelly@ncl.ac.uk>
"The best way to predict the future is to invent it" - Alan Kay

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Sean Kelly (#1)
Re: ";" no longer allowed to terminate a command beginning with "\"

Sean Kelly writes:

Just would like some "is this a bug or a feature"-style
clarification on this please.

It was an undocumented "fact" that didn't work very well or consistently,
but it will be back.

In PostgreSQL v6.5 you used to be able to end a command issued to
"psql" starting with a backslash "\" with a semicolon ";", eg.

--
Peter Eisentraut Sernanders v�g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden