pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
COPY with FORMAT in Postgresql 9.x
2+ messages / 2 participants
[nested] [flat]

* COPY with FORMAT in Postgresql 9.x
@ 2010-12-02 21:45 Humair Mohammed <humairm@hotmail.com>
  2010-12-03 15:51 ` Re: COPY with FORMAT in Postgresql 9.x Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Humair Mohammed @ 2010-12-02 21:45 UTC (permalink / raw)
  To: pgsql-sql



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. 		 	   		  =

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: COPY with FORMAT in Postgresql 9.x
  2010-12-02 21:45 COPY with FORMAT in Postgresql 9.x Humair Mohammed <humairm@hotmail.com>
@ 2010-12-03 15:51 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2010-12-03 15:51 UTC (permalink / raw)
  To: Humair Mohammed <humairm@hotmail.com>; +Cc: pgsql-sql

Humair Mohammed <humairm@hotmail.com> 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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2010-12-03 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-12-02 21:45 COPY with FORMAT in Postgresql 9.x Humair Mohammed <humairm@hotmail.com>
2010-12-03 15:51 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox