From: Bruce Momjian <maillist@candle.pha.pa.us>
To: mancinel@univaq.it
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] ' escape
Date: Sat, 12 Dec 1998 23:33:18 -0500 (EST)
Message-ID: <199812130433.XAA14165@candle.pha.pa.us> (raw)
In-Reply-To: <Pine.GSO.3.96.981207162742.896B-100000@brutus>
>
> Hello all
>
> I have a question. When I create a table I cannot use any escape to put a
> ' character in the default field definition.
>
> CREATE TABLE Test (name varchar(128) default 'Something with '' into');
>
> Fails. I've tried also other alternatives :
> default "Something with ' into"
> default "Something with '' into"
> default 'Something with \' into'
> default 'Something with \27 into'
> default 'Something with \0x27 into'
>
> Everything fails.
>
> How can I set a default with a string containing a ' ?
>
> Thank you all.
Added to TODO:
* DEFAULT handles single quotes in value by requiring too many quotes
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
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: maillist@candle.pha.pa.us, mancinel@univaq.it
Subject: Re: [SQL] ' escape
In-Reply-To: <199812130433.XAA14165@candle.pha.pa.us>
References: <Pine.GSO.3.96.981207162742.896B-100000@brutus> <199812130433.XAA14165@candle.pha.pa.us>
* 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