Thread: bug in psql

bug in psql

From
Neil Conway
Date:
This seems strange:

nconway=> create table ddd\\bar;
Invalid command \. Try \? for help.
nconway-> select 1;
ERROR:  parser: parse error at or near "select"

Cheers,

Neil

-- 
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC



Re: bug in psql

From
GB Clark
Date:
On 07 Mar 2002 22:44:11 -0500
Neil Conway <nconway@klamath.dyndns.org> wrote:

> This seems strange:
> 
> nconway=> create table ddd\\bar;
> Invalid command \. Try \? for help.
Ok, I get this error the same.

> nconway-> select 1;
> ERROR:  parser: parse error at or near "select"
This error I DO NOT GET.  Under 7.1.1, 7.2RC1 or 7.2
> Cheers,
> 
> Neil
> 
> -- 
> Neil Conway <neilconway@rogers.com>
> PGP Key ID: DB3C29FC
> 


GB

-- 
GB Clark II             | Roaming FreeBSD Admin
gclarkii@VSServices.COM | General Geek           CTHULU for President - Why choose the lesser of two evils?


Re: bug in psql

From
missive@frontiernet.net (Lee Harr)
Date:
> 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);