Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 3E4951336B42 for ; Tue, 22 Feb 2011 16:48:27 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 32967-09 for ; Tue, 22 Feb 2011 20:48:15 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mh4.mail.rice.edu (mh4.mail.rice.edu [128.42.199.11]) by mail.postgresql.org (Postfix) with ESMTP id 8995D1336971 for ; Tue, 22 Feb 2011 16:48:15 -0400 (AST) Received: from mh4.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh4.mail.rice.edu (Postfix) with ESMTP id C6B1228FBF8; Tue, 22 Feb 2011 14:48:14 -0600 (CST) X-Virus-Scanned: by amavis-2.6.4 at mh4.mail.rice.edu, auth channel Received: from mh4.mail.rice.edu ([127.0.0.1]) by mh4.mail.rice.edu (mh4.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id KY9IsKss6Wr1; Tue, 22 Feb 2011 14:48:14 -0600 (CST) X-SMTP-Auth: no X-SMTP-Auth: no Received: from aart.is.rice.edu (aart.is.rice.edu [168.7.56.48]) by mh4.mail.rice.edu (Postfix) with ESMTP id 7054328FBEE; Tue, 22 Feb 2011 14:48:14 -0600 (CST) Received: by aart.is.rice.edu (Postfix, from userid 18612) id A1B282D5A6; Tue, 22 Feb 2011 14:48:13 -0600 (CST) Date: Tue, 22 Feb 2011 14:48:12 -0600 From: Kenneth Marshall To: John Fabiani Cc: pgsql-sql@postgresql.org Subject: Re: quotes etc Message-ID: <20110222204812.GA9375@aart.is.rice.edu> References: <201102221226.41317.johnf@jfcomputer.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201102221226.41317.johnf@jfcomputer.com> User-Agent: Mutt/1.5.16 (2007-06-09) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201102/110 X-Sequence-Number: 35186 On Tue, Feb 22, 2011 at 12:26:41PM -0800, John Fabiani wrote: > Hi, > I would have thought that there would be a simple built-in function that would > escape the quotes as ('D' Andes') to ('D\' Andes'). But I did not see > anything? > > I am I wrong? > > Johnf > The manual goes over many permutations of the escape process and what options can be used in each case. I would start there, because for example, escaping a "'" in SQL uses two "'"s: i.e. 'D' Andes' becomes 'D'' Andes' I think. Procedural languages and libpq can offer many other options for escape processing. Cheers, Ken