Re: Escaping special characters

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Escaping special characters
Дата
Msg-id 49BF97F7.2060401@archonet.com
обсуждение исходный текст
Ответ на Escaping special characters  (Neanderthelle Jones <elle@view.net.au>)
Список pgsql-general
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 "E" precedes the quoted string, it isn't embedded in it.
If there's an example in the docs that looks like yours, that's a bug.

> But it mightn't if I upgrade from 8.2.3.  Deprecated.  Can't risk it.
> So 40,000 years from now I'll be on 8.2.3.

Doubtful - you're missing 9 releases of bugfixes already. Probably find
all your data gets eaten by a bug long before then. Read the release
notes for 8.2.x and upgrade to 8.2.<latest> at your earliest convenience.

--
  Richard Huxton
  Archonet Ltd

В списке pgsql-general по дате отправления:

Предыдущее
От: Thom Brown
Дата:
Сообщение: Re: Escaping special characters
Следующее
От: Sam Mason
Дата:
Сообщение: Re: Escaping special characters