Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id D16366335A2 for ; Sat, 6 Jun 2009 14:42:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 94667-03 for ; Sat, 6 Jun 2009 14:42:30 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from joeconway.com (wsip-72-214-29-243.sd.sd.cox.net [72.214.29.243]) by mail.postgresql.org (Postfix) with ESMTP id 02CDA632A32 for ; Sat, 6 Jun 2009 14:42:29 -0300 (ADT) Received: from [192.168.4.40] (account jconway [192.168.4.40] verified) by joeconway.com (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 7904678; Sat, 06 Jun 2009 10:42:24 -0700 Message-ID: <4A2AAA80.9060905@joeconway.com> Date: Sat, 06 Jun 2009 10:42:24 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.12) Gecko/20071019 Fedora/1.5.0.12-3.fc6 pango-text Thunderbird/1.5.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Tom Lane CC: "Hackers (PostgreSQL)" Subject: Re: [Fwd: Re: dblink patches for comment] References: <4A29E789.1050405@joeconway.com> <10658.1244304503@sss.pgh.pa.us> In-Reply-To: <10658.1244304503@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.1 tagged_above=0 required=5 tests=RDNS_DYNAMIC=0.1 X-Spam-Level: X-Archive-Number: 200906/519 X-Sequence-Number: 139574 Tom Lane wrote: > The quoting logic is still completely the wrong thing :-(. For one > thing, quote_literal will try to generate E'' syntax in some cases. > But more to the point, quote_literal's quoting rules don't match > what is needed. A look at libpq's conninfo_parse says that what it > accepts is single-quoted strings in which backslash quotes the next > character. It does not recognize doubled single quotes. I think > you will need to whip up a special-purpose quoting subroutine. OK, I see that. I assume I need to care for encoding issues? If so, do I assume server encoding or client encoding? >> + return pstrdup(buf->data); > > is a waste of time. The StringInfo's buffer is already palloc'd. Thanks -- will fix. Joe