From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] ' escape
Date: Tue, 8 Dec 1998 11:45:18 +0200
Message-ID: <l03110700b292a3705f91@[147.233.159.109]> (raw)
In-Reply-To: <m0znJQL-000EBPC@orion.SAPserv.Hamburg.dsh.de>
References: <199812072259.RAA02133@candle.pha.pa.us>
At 11:27 +0200 on 8/12/98, Jan Wieck wrote:
>
> But
>
> create table ... default 'x\'\'y');
>
> does. Whenever something around quotes doesn't work, I first
> try to double them.
Nevertheless, it is a bug. You should double your quotes when they are
inside other quotes. When surrounded by doubled quotes, you have to
quadruple them. Or to escape them and escape the escapes. The following
also works:
testing=> CREATE TABLE test1
testing-> (
testing-> id int,
testing-> name varchar(128) default 'something with \\'' in it'
testing-> );
But it shouldn't, because it is only surrounded by single unescaped quotes.
If this string is used in any other context, it will have a single slash
and a single quote in it. Something is amiss.
Herouth
--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: herouth@oumail.openu.ac.il
Subject: Re: [SQL] ' escape
In-Reply-To: <l03110700b292a3705f91@[147.233.159.109]>
References: <199812072259.RAA02133@candle.pha.pa.us> <l03110700b292a3705f91@[147.233.159.109]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox