Re: bug in psql - Mailing list pgsql-hackers

From missive@frontiernet.net (Lee Harr)
Subject Re: bug in psql
Date
Msg-id slrna8la99.67.missive@whave.frontiernet.net
Whole thread Raw
In response to bug in psql  (Neil Conway <nconway@klamath.dyndns.org>)
List pgsql-hackers
> This seems strange:
> 
> nconway=> create table ddd\\bar;
> Invalid command \. Try \? for help.
> nconway-> select 1;

Notice ..^ secondary prompt here
Try \e between these two commands to see the
current query buffer. 


> ERROR:  parser: parse error at or near "select"
> 

Because your query is actually:
CREATE TABLE ddd SELECT 1;



Try this:

CREATE TABLE ddd \d
(i int)
\e


OR

CREATE TABLE ddd\\bar;
\e


Or, are you saying you want to be able to create a table
with a backslash in the name by escaping the backslash?

If so, you can use:

CREATE TABLE "ddd\bar" (i int);




pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: LRU and full table scans
Next
From: "info"
Date:
Subject: FW: Re: [JDBC] DB mirroring