Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 3AA2A9FBD2F for ; Tue, 3 Jul 2007 14:56:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 27723-07 for ; Tue, 3 Jul 2007 14:56:51 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mtao02.charter.net (mtao02.charter.net [209.225.8.187]) by postgresql.org (Postfix) with ESMTP id 887759FB92C for ; Tue, 3 Jul 2007 14:56:52 -0300 (ADT) Received: from aa03.charter.net ([10.20.200.155]) by mtao02.charter.net (InterMail vM.7.08.02.00 201-2186-121-20061213) with ESMTP id <20070703175646.THNP9370.mtao02.charter.net@aa03.charter.net>; Tue, 3 Jul 2007 13:56:46 -0400 Received: from [10.0.1.2] (really [66.188.164.45]) by aa03.charter.net with ESMTP id <20070703175646.QBMK7864.aa03.charter.net@[10.0.1.2]>; Tue, 3 Jul 2007 13:56:46 -0400 In-Reply-To: References: <46898000.7030601@autoledgers.com.au> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <4A068101-E181-4183-BB4D-44243B344F22@seespotcode.net> Cc: Paul Lambert , pgsql-sql@postgresql.org Content-Transfer-Encoding: 7bit From: Michael Glaesemann Subject: Re: Using escape strings in an insert statement. Date: Tue, 3 Jul 2007 12:56:39 -0500 To: Erik Jones X-Mailer: Apple Mail (2.752.2) X-Chzlrs: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/22 X-Sequence-Number: 28757 On Jul 3, 2007, at 10:49 , Erik Jones wrote: > On Jul 2, 2007, at 6:11 PM, Michael Glaesemann wrote: > >> >> On Jul 2, 2007, at 17:45 , Paul Lambert wrote: >> >>> tester=# insert into testing (test_text) values ('abcE'\\'123'); >> >> This should be >> INSERT INTO testing (test_text) values (E'abc\123'); > > No, that will leave him with the string 'abc23' beinginserted, he > wants the backslash to be included in the string, that's why he had > two, so it should be: > > INSERT INTO testing (test_text) values (E'abc\\123'); Ah, right. Thanks for the correction, Erik. Michael Glaesemann grzm seespotcode net