Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id A1EB9B5D8BD for ; Tue, 7 Jun 2011 21:20:07 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 69331-03 for ; Wed, 8 Jun 2011 00:20:00 +0000 (UTC) X-Greylist: delayed 01:01:12.387841 by SQLgrey-1.7.6 Received: from outmail149066.authsmtp.net (outmail149066.authsmtp.net [62.13.149.66]) by mail.postgresql.org (Postfix) with ESMTP id 85CEBB5D832 for ; Tue, 7 Jun 2011 21:20:00 -0300 (ADT) Received: from mail-c194.authsmtp.com (mail-c194.authsmtp.com [62.13.128.121]) by punt8.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id p57NIlaU034405 for ; Wed, 8 Jun 2011 00:18:47 +0100 (BST) Received: from Sidney-Stratton.local (70-36-143-243.dsl.dynamic.sonic.net [70.36.143.243]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2) with ESMTP id p57NIefm018591 for ; Wed, 8 Jun 2011 00:18:41 +0100 (BST) Message-ID: <4DEEB1D0.4080503@fuzzychef.org> Date: Tue, 07 Jun 2011 16:18:40 -0700 From: The Fuzzy Chef User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: psql's \copy incompatible with :variables X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Server-Quench: 7bba5946-915c-11e0-80b9-0022640b883e X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdyZgscClZbURYI GwsKET1SWA4lKxMK BgUMOxNVO0MNEA5M PV1yNl1ILFIGSEpA X3hUGQMaUFVuIyYr dAhRbARNYkpEXg1g VEkHRVJMFwN2ABgC GBwaUQZwcgdDZ34+ JUNlIAkOChl6dE54 S08aEmQHK2AyOjEa WUReagpVdVBXfx4Q ak13VCEEfGUHZHhm Q1c5b2BqMCNHMz1R DRpFGVkVWVdDHzg3 QBUaFCkuF0kIDzoy MxxueEAVBkcYOEE/ KjO2 X-Authentic-SMTP: 61633136333939.1015:706 X-AuthFastPath: 0 (Was 255) X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201106/84 X-Sequence-Number: 30463 Summary: \copy interprets psql's :variables as literal strings Tested On: 8.4.4, 9.0.4 Severity: Annoyance Steps to Reproduce: psql \set filename 'test.csv' \copy pg_class to :filename with csv \q ls :filename Note that psql variables work perfectly fine with COPY. It's just \copy which seems to be misbehaving. --Josh