Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iucoT-0005Ad-1w for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Jan 2020 13:46:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iucoP-0006wl-87 for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Jan 2020 13:46:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iucoN-0006wd-Rj for pgsql-hackers@lists.postgresql.org; Thu, 23 Jan 2020 13:46:21 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iucoH-00032s-Ob for pgsql-hackers@lists.postgresql.org; Thu, 23 Jan 2020 13:46:16 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id CB74A533; Thu, 23 Jan 2020 08:46:11 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Thu, 23 Jan 2020 08:46:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=GAHF6itH3dgR7ruhfhZEhnnL0qQAFH1+sV3z4Nd+T CA=; b=dw2G6VphA3cEBtJGHbBDPnieFxgf46lEDxckVb5Ksh2qugjVxxbWCTuA+ RFbZwfCEWt+r7LzKC5R990ZiDwUdDzbLYspxLnltrbtJrEapNjFqjzqSL0KnBF94 XsT5/gIoFEIE2Y411LCUTztd6kICccYMM7enw2ui6NrideLlWuITX8W7qZ8YChAJ IPVt/CJApUVnITmhxpRlOKZhvVkT1AT/aoa3Tr7YdVUSTsqiAM6bPs+czOGT09hc nzyulDyEMxjhilULT6YkJKrlhivuSIGwfwHaAb165MAiTs8Mfp26S4adli+ejTaq OPfNDUOSxWgymz9o3tJvIYBsiS1IQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrvddvgdefvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhohfkffgfgggjtgfgsehtje ertddtfeehnecuhfhrohhmpefrvghtvghrucfgihhsvghnthhrrghuthcuoehpvghtvghr rdgvihhsvghnthhrrghuthesvdhnughquhgrughrrghnthdrtghomheqnecuffhomhgrih hnpedvnhguqhhurggurhgrnhhtrdgtohhmnecukfhppeelfedrvdegvddrvdehhedruddu vdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvg htvghrrdgvihhsvghnthhrrghuthesvdhnughquhgrughrrghnthdrtghomh X-ME-Proxy: Received: from april.pezone.net (p5df2ff70.dip0.t-ipconnect.de [93.242.255.112]) by mail.messagingengine.com (Postfix) with ESMTPA id 2C0CF3280064; Thu, 23 Jan 2020 08:46:10 -0500 (EST) Subject: Re: BUG #16059: Tab-completion of filenames in COPY commands removes required quotes To: Tom Lane References: <16059-8836946734c02b84@postgresql.org> <30313.1572729260@sss.pgh.pa.us> <1628.1572820800@sss.pgh.pa.us> <6ccd23e4-ce58-c2b5-39a1-801a9937ae86@2ndquadrant.com> <12699.1578058657@sss.pgh.pa.us> <32307.1578290788@sss.pgh.pa.us> <1ed54e8f-d84e-bfbe-ffad-890015e12735@2ndquadrant.com> <28497.1578947794@sss.pgh.pa.us> <22096.1578965897@sss.pgh.pa.us> Cc: pgsql-hackers@lists.postgresql.org, steven.winfield@cantabcapital.com From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Thu, 23 Jan 2020 14:46:08 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <22096.1578965897@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-01-14 02:38, Tom Lane wrote: > I wrote: >> Peter Eisentraut writes: >>> I have found a weird behavior with identifier quoting, which is not the >>> subject of this patch, but it appears to be affected by it. > >> I'll think about how to improve this. Given that we're dequoting >> filenames explicitly anyway, maybe we don't need to tell readline that >> double-quote is a quoting character. Another idea is that maybe >> we ought to refactor things so that identifier dequoting and requoting >> is handled explicitly, similarly to the way filenames work now. >> That would make the patch a lot bigger though. > > On reflection, it seems like the best bet for the moment is to > remove double-quote from the rl_completer_quote_characters string, > which should restore all behavior around double-quoted strings to > what it was before. (We have to keep single-quote in that string, > though, or quoted file names fail entirely.) This patch (version 6) looks good to me. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services