Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.9.1/8.9.1) with ESMTP id XAA23095 for ; Sat, 12 Dec 1998 23:34:32 -0500 (EST) (envelope-from maillist@candle.pha.pa.us) Received: (from maillist@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id XAA14165; Sat, 12 Dec 1998 23:33:18 -0500 (EST) From: Bruce Momjian Message-Id: <199812130433.XAA14165@candle.pha.pa.us> Subject: Re: [SQL] ' escape In-Reply-To: from Fabio Mancinelli at "Dec 7, 1998 4:31:31 pm" To: mancinel@univaq.it (Fabio Mancinelli) Date: Sat, 12 Dec 1998 23:33:18 -0500 (EST) Cc: pgsql-sql@postgreSQL.org X-Mailer: ELM [version 2.4ME+ PL47 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > > 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