Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 4F3621337B5A for ; Thu, 2 Dec 2010 17:47:00 -0400 (AST) 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 04372-09 for ; Thu, 2 Dec 2010 21:46:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from col0-omc2-s9.col0.hotmail.com (col0-omc2-s9.col0.hotmail.com [65.55.34.83]) by mail.postgresql.org (Postfix) with ESMTP id F2AF11337B49 for ; Thu, 2 Dec 2010 17:46:52 -0400 (AST) Received: from COL115-W14 ([65.55.34.72]) by col0-omc2-s9.col0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 2 Dec 2010 13:45:21 -0800 Message-ID: Content-Type: multipart/alternative; boundary="_0390f3b3-e6e1-4314-8e58-f90e6b506c49_" X-Originating-IP: [99.41.189.101] From: Humair Mohammed To: Subject: COPY with FORMAT in Postgresql 9.x Date: Thu, 2 Dec 2010 15:45:21 -0600 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 02 Dec 2010 21:45:21.0333 (UTC) FILETIME=[37F73E50:01CB926A] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.907 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RFC_ABUSE_POST=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/11 X-Sequence-Number: 34847 --_0390f3b3-e6e1-4314-8e58-f90e6b506c49_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Postgres 9.x provies the COPY command with new syntax with a new option cal= led 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=3B 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. = = --_0390f3b3-e6e1-4314-8e58-f90e6b506c49_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Postgres 9.x provies the COPY command with new syntax w= ith a new option called FORMAT


How= ever when I run the following command:

COPY dQstn = FROM 'c:/bcp/postgres/dQstn.csv' WITH FORMAT csv=3B

I =3Bget the following error message:

ERROR:=  =3Bsyntax error at or near "FORMAT"

If= I use the 8.x syntax without the FORMAT option it works fine.
= = --_0390f3b3-e6e1-4314-8e58-f90e6b506c49_--