Received: from mx99.openu.ac.il (arbel.openu.ac.il [147.233.32.4]) by hub.org (8.9.2/8.9.1) with ESMTP id HAA24663 for ; Mon, 22 Mar 1999 07:33:51 -0500 (EST) (envelope-from herouth@oumail.openu.ac.il) Received: from talmon.openu.ac.il (talmon.openu.ac.il [147.233.32.11]) by mx99.openu.ac.il (Postfix) with ESMTP for id 783364B4A1; Mon, 22 Mar 1999 14:33:49 +0200 (IST) Received: from [147.233.148.111] (1135.pc.openu.ac.il) by talmon.openu.ac.il (Netscape Messaging Server 3.54) with ESMTP id AAA1974; Mon, 22 Mar 1999 14:35:33 +0200 X-Sender: herouth@shaked.cc.openu.ac.il Message-Id: In-Reply-To: <36F3C76D.42F9EAFD@evoserve.com> References: <199903201248.HAA19314@candle.pha.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Mon, 22 Mar 1999 14:35:12 +0200 To: Brian Baquiran , pgsql-sql@postgreSQL.org From: Herouth Maoz Subject: Re: [SQL] string containing (') At 18:06 +0200 on 20/03/1999, Brian Baquiran wrote: > > > > > HI! > > > Can anyone help, > > > I want to store a string into a relation that might contain an apostrophe > > > ('). Is there anyway around this or can I not store such strings. > > > Thanks for your help > > > > '\'' > > I've always thought the proper way was to use 2 quotes (''). It is the proper way, as far as compatibility to standard SQL is concerned. Both methods are supported by PostgreSQL, though. I have a certain grievance against PostgreSQL and its escaping mechanism, which makes scripts written in standard SQL produce wrong results if they have backslashes in them. Perhaps there should be a switch, SET COMPATIBILITY or something, which disables incompatible parses from taking place, and allows using legacy script with little concern for the content of the strings. Herouth -- Herouth Maoz, Internet developer. Open University of Israel - Telem project http://telem.openu.ac.il/~herutma