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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-bugs by date

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