Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 15EE31337B6E for ; Fri, 3 Dec 2010 11:52:00 -0400 (AST) 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 99913-08 for ; Fri, 3 Dec 2010 15:51:53 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id AE05C1335B36 for ; Fri, 3 Dec 2010 11:51:52 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id oB3FpoxH026321; Fri, 3 Dec 2010 10:51:50 -0500 (EST) To: Humair Mohammed cc: pgsql-sql@postgresql.org Subject: Re: COPY with FORMAT in Postgresql 9.x In-reply-to: References: Comments: In-reply-to Humair Mohammed message dated "Thu, 02 Dec 2010 15:45:21 -0600" Date: Fri, 03 Dec 2010 10:51:50 -0500 Message-ID: <26320.1291391510@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/15 X-Sequence-Number: 34851 Humair Mohammed writes: > Postgres 9.x provies the COPY command with new syntax with a new option called FORMAT > http://www.postgresql.org/docs/current/static/sql-copy.html > However when I run the following command: > COPY dQstn FROM 'c:/bcp/postgres/dQstn.csv' WITH FORMAT csv; > I get the following error message: > ERROR: syntax error at or near "FORMAT" > If I use the 8.x syntax without the FORMAT option it works fine. This is expected: you have to use the new syntax (with parens) for any of the new options. regards, tom lane