Received: from shaked.cc.openu.ac.il (shaked.cc.openu.ac.il [147.233.145.65]) by hub.org (8.9.1/8.9.1) with ESMTP id EAA25658 for ; Tue, 8 Dec 1998 04:43:58 -0500 (EST) (envelope-from herouth@oumail.openu.ac.il) Received: from [147.233.159.109] (herouth@mac-herouth.pc.openu.ac.il [147.233.159.109]) by shaked.cc.openu.ac.il (8.8.8/8.8.8) with ESMTP id LAA04929 for ; Tue, 8 Dec 1998 11:43:52 +0200 (IST) X-Sender: herouth@shaked.cc.openu.ac.il Message-Id: In-Reply-To: References: <199812072259.RAA02133@candle.pha.pa.us> from "Bruce Momjian" at Dec 7, 98 05:59:48 pm Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Tue, 8 Dec 1998 11:45:18 +0200 To: pgsql-sql@postgreSQL.org From: Herouth Maoz Subject: Re: [SQL] ' escape 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