Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] Still have problem with single quotation mark

From: Michael Meskes <meskes(at)postgreSQL(dot)org>
To: Theofilu Andreas <theofilu(at)eunet(dot)at>
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] Still have problem with single quotation mark
Date: 1999-09-14 18:24:35
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
On Mon, Sep 13, 1999 at 10:11:53PM +0200, Theofilu Andreas wrote:
> There is still a problem with the single quotation mark (') inside a
> string, when this string is inserted into the database and one uses 'ecpg'.
> Someone on this list told me, that I should precede a ' with a second '
> (''). Then it would not be interpreted as the end of string. I did this and
> realy, now it is not interpreted at all. 'ecpg' puts now both quotation
> marks into the database table. This makes for example the words 'I don't
> want this' appear as 'I don''t want this'. Preceding the quotation mark
> with a backslash does not help also. Then I get the SQL error 'too many
> arguments in line xxx'. This is really annoying. How can I fix this?

Which version do you use? There was a quotation problem that should be solved in
the current version. Also how do you feed the date into the statement? As a
char variable or as a constant string?

Michael Meskes                         | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz    | Go Rhein Fire!
Tel.: (+49) 2431/72651                 | Use Debian GNU/Linux!
Email: Michael(at)Fam-Meskes(dot)De           | Use PostgreSQL!

In response to

pgsql-interfaces by date

Next:From: Michael MeskesDate: 1999-09-14 18:29:10
Subject: Re: [INTERFACES] Still have problem with single quotation mark
Previous:From: Michael MeskesDate: 1999-09-14 18:23:04
Subject: Re: [INTERFACES] ecpg and getting just assigned serial number

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group