Re: Trouble With Strings - Mailing list pgsql-general

From Richard Huxton
Subject Re: Trouble With Strings
Date
Msg-id 00a301c05563$eb11a7e0$1001a8c0@archonet.com
Whole thread Raw
In response to Trouble With Strings  (Colin Taylor <Colin_Taylor@PortaSystemsDev.com>)
List 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 by date:

Previous
From: Robert Stachurski
Date:
Subject: Question about function
Next
From: Bernie Huang
Date:
Subject: Postgres session