Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 914C7B5D832 for ; Tue, 7 Jun 2011 21:22:31 -0300 (ADT) 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 75945-09 for ; Wed, 8 Jun 2011 00:22:24 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp-2.01.com (smtp-2.01.com [38.102.63.181]) by mail.postgresql.org (Postfix) with ESMTP id 62C90B5D803 for ; Tue, 7 Jun 2011 21:22:24 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-2.01.com (Postfix) with ESMTP id 9E7B31ADCE3 for ; Tue, 7 Jun 2011 19:22:24 -0500 (CDT) Received: from smtp-2.01.com ([127.0.0.1]) by localhost (smtp-2.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n8jeZ807mA3J for ; Tue, 7 Jun 2011 19:22:24 -0500 (CDT) Received: by smtp-2.01.com (Postfix, from userid 99) id 858D41AD98E; Tue, 7 Jun 2011 19:22:24 -0500 (CDT) Received: from Sidney-Stratton.local (70-36-143-243.dsl.dynamic.sonic.net [70.36.143.243]) by smtp-2.01.com (Postfix) with ESMTPSA id 503961ADCE3 for ; Tue, 7 Jun 2011 19:22:24 -0500 (CDT) Message-ID: <4DEEC0BF.7030105@agliodbs.com> Date: Tue, 07 Jun 2011 17:22:23 -0700 From: Josh Berkus Organization: PostgreSQL Experts Inc. 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-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/80 X-Sequence-Number: 30459 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 Berkus PostgreSQL Experts Inc. http://pgexperts.com