Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 848CF9FBBB2 for ; Tue, 27 Feb 2007 13:25:59 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 54067-01 for ; Tue, 27 Feb 2007 13:25:56 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id E4E659FBBC0 for ; Tue, 27 Feb 2007 13:25:55 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l1RHPs8I021454; Tue, 27 Feb 2007 12:25:54 -0500 (EST) To: Osvaldo Rosario Kussama cc: hongliu zou , pgsql-sql@postgresql.org Subject: Re: Syntax Error in COPY when =?windows-1252?Q?=93create_?= =?windows-1252?Q?function=94?= In-reply-to: <45E464B3.30402@yahoo.com.br> References: <35201a90702261904o44c18d99oa9fdbeb0dca4c9c0@mail.gmail.com> <45E464B3.30402@yahoo.com.br> Comments: In-reply-to Osvaldo Rosario Kussama message dated "Tue, 27 Feb 2007 14:04:51 -0300" Date: Tue, 27 Feb 2007 12:25:54 -0500 Message-ID: <21453.1172597154@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.917 tagged_above=0 required=5 tests=AWL, BAYES_50, SPF_HELO_PASS, SPF_PASS, SUBJECT_ENCODED_TWICE X-Spam-Level: X-Archive-Number: 200702/284 X-Sequence-Number: 27618 Osvaldo Rosario Kussama writes: >> |Does this mean the "filename" in COPY command can not be a variable?| Got it in one. You can use EXECUTE to put together commands that require a variable in places where PG doesn't allow one. regards, tom lane