Re: problems with single quotes.. - Mailing list pgsql-sql

From Joe Conway
Subject Re: problems with single quotes..
Date
Msg-id 3C0A4019.6040004@home.com
Whole thread Raw
In response to Re: Unexpected Return from Function  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-sql
Megalex wrote:

> ok.. here is my deal..
> 
> everytime i try to run an insert and my text contains '\'
> it fails..
> 
> an sql example would be.
> 
> Insert Into table(userID,FirstName,LastName) values(1,'''\''','test')
> and i get this message...
> 
> Error while executing the query; ERROR: parser: parse error at or near
> "test"
> 
> how can i fix this??

It isn't clear to me what literal you're trying to insert, but it looks 
like it's either:

vsreg_192=# select '\'\'\\\'\''; ?column?
---------- ''\''
(1 row)

or

vsreg_192=# select '\'\\\''; ?column?
---------- '\'
(1 row)

HTH,

Joe



pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: problems with single quotes..
Next
From: Tom Lane
Date:
Subject: Re: problems with single quotes..