pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Glaesemann <grzm@seespotcode.net>
To: Erik Jones <erik@myemma.com>
Cc: Paul Lambert <paul.lambert@autoledgers.com.au>
Cc: pgsql-sql@postgresql.org
Subject: Re: Using escape strings in an insert statement.
Date: Tue, 3 Jul 2007 12:56:39 -0500
Message-ID: <4A068101-E181-4183-BB4D-44243B344F22@seespotcode.net> (raw)
In-Reply-To: <EA4E45FC-EC9D-4063-A208-A37B2F509C80@myemma.com>
References: <46898000.7030601@autoledgers.com.au>
	<B98511E0-E97F-4B76-82F0-CE92FC2ACA07@seespotcode.net>
	<EA4E45FC-EC9D-4063-A208-A37B2F509C80@myemma.com>


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





view thread (6+ messages)

Message-ID: <4A068101-E181-4183-BB4D-44243B344F22@seespotcode.net>
Permalink:  ../4A068101-E181-4183-BB4D-44243B344F22@seespotcode.net/
Also on:    postgresql.org/message-id/4A068101-E181-4183-BB4D-44243B344F22@seespotcode.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: grzm@seespotcode.net, erik@myemma.com, paul.lambert@autoledgers.com.au
  Subject: Re: Using escape strings in an insert statement.
  In-Reply-To: <4A068101-E181-4183-BB4D-44243B344F22@seespotcode.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox