Received: from femail34.sdc1.sfba.home.com (femail34.sdc1.sfba.home.com [24.254.60.24]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fB2Epum24825 for ; Sun, 2 Dec 2001 09:51:56 -0500 (EST) (envelope-from joseph.conway@home.com) Received: from home.com ([24.0.42.111]) by femail34.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with ESMTP id <20011202145200.NKZZ5188.femail34.sdc1.sfba.home.com@home.com>; Sun, 2 Dec 2001 06:52:00 -0800 Message-ID: <3C0A4019.6040004@home.com> Date: Sun, 02 Dec 2001 06:52:09 -0800 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.6+) Gecko/20011126 X-Accept-Language: en-us MIME-Version: 1.0 To: Megalex CC: pgsql-sql@postgresql.org Subject: Re: problems with single quotes.. References: <20011201182212.R74581-100000@megazone23.bigpanda.com> <000b01c07680$29fb2430$0301a8c0@klanomega.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200112/8 X-Sequence-Number: 5831 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