Re: Trouble With Strings

From: "Richard Huxton" <dev(at)archonet(dot)com>
To: "Pgsql Mailing List (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Trouble With Strings
Date: 2000-11-23 15:41:57
Message-ID: 00a301c05563$eb11a7e0$1001a8c0@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

----- Original Message -----
From: "Colin Taylor" <Colin_Taylor(at)PortaSystemsDev(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Don Baccus 2000-11-23 15:58:29 Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL
Previous Message Yves Martin 2000-11-23 15:34:33 Statement too long