Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 0C26DB5DC31 for ; Fri, 14 Oct 2011 15:54:58 -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 33291-03 for ; Fri, 14 Oct 2011 18:54:51 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 568A8B5DC2A for ; Fri, 14 Oct 2011 15:54:51 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id p9EIsf524389; Fri, 14 Oct 2011 14:54:41 -0400 (EDT) From: Bruce Momjian Message-Id: <201110141854.p9EIsf524389@momjian.us> Subject: Re: psql's \copy incompatible with :variables In-Reply-To: <4E986E38.2030505@agliodbs.com> To: Josh Berkus Date: Fri, 14 Oct 2011 14:54:41 -0400 (EDT) CC: Tom Lane , pgsql-bugs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201110/122 X-Sequence-Number: 31392 Josh Berkus wrote: > > > \copy is different because it uses OT_WHOLE_LINE mode to read the > > argument, and that doesn't expand :variable references. I'd be a bit > > leery of changing that. > > So, doc warning then? I don't think enough people have hit this problem to warrant that. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +