Skip site navigation (1) Skip section navigation (2)

Re: Problem with apostrophes in TK frontend

From: Chris <linux(dot)fellow(at)libertysurf(dot)fr>
To: hramrach(at)centrum(dot)cz
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Problem with apostrophes in TK frontend
Date: 2000-12-21 18:31:50
Message-ID: 3A424C96.B7CEF03C@libertysurf.fr (view raw or flat)
Thread:
Lists: pgsql-bugs
> insert into "tab1" ("taet","text","text2","id") values ('skldgj 'dgk dlf','dgsdfkl gh ;sdfgh
> dlfkgh','dfl;sj gkl;j','456464654')
> 
> ERROR:  parser: parse error at or near "dgk"
> 

Of course it is not correctly quoted. If you want to insert a quote in the
string, just put it twice.

insert into "tab1" ("taet","text","text2","id") values ('skldgj ''dgk
dlf','dgsdfkl gh ;sdfgh
dlfkgh','dfl;sj gkl;j','456464654')

if you want to insert a backslash, it's the same :

insert into "tab1" ("text") values ('need a \\ ?');

Hope this will solve your problem.

In response to

pgsql-bugs by date

Next:From: ChrisDate: 2000-12-21 18:37:13
Subject: Re: bug
Previous:From: Tom LaneDate: 2000-12-21 17:41:27
Subject: Re: postgresql process crashes on select * from cmd_sm (which is a view)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group