On Tue, 17 Mar 2009, Sam Mason wrote:
> You're putting things in the wrong places! The "E" says that the
> following literal is using C style escaping. I.e. you want to say:
>
> E'Smith \\& Jones'
Thanks. Now I understand.
Elle.
--
Sent via pgsql-general mailing list (pgsql-general@post
Neanderthelle Jones wrote:
About the string "Smith \& Jones".
According to the documentation,
INSERT INTO thing (name) VALUES ('Smith E'\\'& Jones');
must work. But it doesn't. So, double the enclosed quotes:
INSERT INTO thing (name) VALUES ('Smith E''\\''& Jones');
The E can't b
2009/3/17 Thom Brown
>
> I could be wrong, but shouldn't it be:
>
> INSERT INTO thing (name) VALUES ('Smith E'\\& Jones');
>
> I'm not sure why you're including an extra single or double-quote in the
> string.
>
> Regards
>
> Thom
>
Sorry, (damn copy & paste). I meant:
INSERT INTO thing (name)
On Tue, Mar 17, 2009 at 10:35:20PM +1030, Neanderthelle Jones wrote:
> About the string "Smith \& Jones".
>
> According to the documentation,
>
> INSERT INTO thing (name) VALUES ('Smith E'\\'& Jones');
>
> must work. But it doesn't.
You're putting things in the wrong places! The "E" says that
Neanderthelle Jones wrote:
> About the string "Smith \& Jones".
>
> According to the documentation,
>
> INSERT INTO thing (name) VALUES ('Smith E'\\'& Jones');
>
> must work. But it doesn't.
I think you'll find the documentation says to use:
SELECT E'Smith \\& Jones';
Note that the
>
> According to the documentation,
>
> INSERT INTO thing (name) VALUES ('Smith E'\\'& Jones');
>
> must work. But it doesn't. So, double the enclosed quotes:
>
> INSERT INTO thing (name) VALUES ('Smith E''\\''& Jones');
>
> Doesn't.
>
> It works fine, but with a warning, as
>
> INSERT INTO thing