Re: Trouble With Strings

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Trouble With Strings
Дата
Msg-id 00a301c05563$eb11a7e0$1001a8c0@archonet.com
обсуждение исходный текст
Ответ на Trouble With Strings  (Colin Taylor <Colin_Taylor@PortaSystemsDev.com>)
Список pgsql-general
----- Original Message -----
From: "Colin Taylor" <Colin_Taylor@PortaSystemsDev.com>


> Hi,
> I have been having a few problems with strings (varchar)s.
> How can I insert a quote ' character in a string?
> The following, needless to say does not work:
>
> INSERT INTO table (string) VALUES ('colin's');
>
INSERT INTO table VALUES ('colin\'s back\\slash');

The doubled-backslash is used to put a backslash in. Perl, PHP and the like
provide help with this sort of thing.

- Richard


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

Предыдущее
От: Robert Stachurski
Дата:
Сообщение: Question about function
Следующее
От: Bernie Huang
Дата:
Сообщение: Postgres session