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 1ifn1C-0005mY-AE for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Dec 2019 15:38:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ifn1B-0003EH-4d for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Dec 2019 15:38:13 +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 1ifn1A-00036t-Ky for pgsql-hackers@lists.postgresql.org; Fri, 13 Dec 2019 15:38:12 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ifn18-0005QR-Ga for pgsql-hackers@lists.postgresql.org; Fri, 13 Dec 2019 15:38:11 +0000 Received: by mail-pg1-x542.google.com with SMTP id 6so8900pgk.0 for ; Fri, 13 Dec 2019 07:38:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=PK2aPqEPRFKi04uTNjFTGPH8u26+j3QUgwZ62sJzOY8=; b=LBtENxAYJsA0fzhmg9w+KX+d0y683rOjwE7TwEB12DXyh4wbPcbwqmAFLoBK1xvjb9 xR9l1MVaYAkO/GUaLeCKcXSeaDbOaV4kqbuF/UTq5/NhJ2+itOl5kDHZApeWPY03vO/N jTz8OSMVS+WZGFp/ocn8SawdL5Nw2Kn+2RHm1RTdeF6eS8ucMm+TOU1Y6Acjl6jJceHf qgNrYJ4ZgH8ZL+lGkCzKF9ya2vQXUDgguA0yoN5uddfj530SEj03Z0tlpKSAllTXGj79 A9J6rdydVDDTmnJ02LOD+Dn/3DZTbdoSrMDoDazcGfR5zeoDKQ9W+HnxZqM4wc7Yn4Ry rePg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=PK2aPqEPRFKi04uTNjFTGPH8u26+j3QUgwZ62sJzOY8=; b=bx5b8m1BblAvkzYVM+jnzqNFDsSTGJJRYEBuH996vt0ITL/oVbC9sNi6RdaENbbLbD CYZU4oTAvLOPDwTpCoVcvzt4LvIFQOE3GoMEIpqadA4wbwakbDqUqNQSq6zywxq3srl5 6/hrH5KRb4OxFYLptyoItwQljzBGND/Y8qxYnX6muvZ9Pby1UH9DnqDlc8XROc4BzPUy R3IjyDqpAMg/qEWM2J/zXk8kJQn6iZnpWmeGN6xt1MLyXMUZu4O2+WMNp7oU+IrWtomE vNZ6fGH8kpAuf9FgzZ1bnlR2Bt8MRuAydw+NjXrqNtZ671wZtEsX4yZdRjA1gO3UfFXg k6qQ== X-Gm-Message-State: APjAAAV0nXPxlIdUzaiOxtcUnOphIgaY16t+SCZeUK57bMbE1nh/XT02 asarrtptsXsztsuudTjerr4D+w== X-Google-Smtp-Source: APXvYqyRJJNU7gpsmsCPEeVoENa4YadRzvMgGGrWZKc30GnrUK3kQhpUVNFzHfqaSt4oaMJJVHThgA== X-Received: by 2002:a63:b64a:: with SMTP id v10mr11430pgt.145.1576251489414; Fri, 13 Dec 2019 07:38:09 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id i4sm9497806pjw.28.2019.12.13.07.38.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2019 07:38:08 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 3ED123008FC; Fri, 13 Dec 2019 12:38:05 -0300 (-03) Date: Fri, 13 Dec 2019 12:38:05 -0300 From: Alvaro Herrera To: Tom Lane Cc: pgsql-hackers@lists.postgresql.org, steven.winfield@cantabcapital.com Subject: Re: BUG #16059: Tab-completion of filenames in COPY commands removes required quotes Message-ID: <20191213153805.GA2808@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <23608.1576248145@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Dec-13, Tom Lane wrote: > I wrote: > >> Alvaro Herrera writes: > >>> #ifdef HAVE_RL_FILENAME_COMPLETION_FUNCTION > >>> #define filename_completion_function rl_filename_completion_function > >>> #else > >>> /* decl missing in some header files, but function exists anyway */ > >>> extern char *filename_completion_function(); > >>> #endif > Looking closer at this, the "extern" could be got rid of, I think. > prairiedog's readline header does have that extern, so it's hard to > believe anybody is still using libedit versions that don't declare it. Agreed. > A possible further change is to switch the code over to calling > "rl_filename_completion_function", and then invert the sense of > this logic, like > > /* > * Ancient versions of libedit provide filename_completion_function() > * instead of rl_filename_completion_function(). > */ > #ifndef HAVE_RL_FILENAME_COMPLETION_FUNCTION > #define rl_filename_completion_function filename_completion_function > #endif > > This would make it easier to compare our code to the readline > documentation, so maybe it's helpful ... or maybe it's just > churn. Thoughts? +1, I think that's clearer. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services