pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
BUG #5964: doc bug -- copy does not take "format" literal 2+ messages / 2 participants [nested] [flat]
* BUG #5964: doc bug -- copy does not take "format" literal @ 2011-04-03 00:44 Chris Curvey <chris@chriscurvey.com> 0 siblings, 1 reply; 2+ messages in thread From: Chris Curvey @ 2011-04-03 00:44 UTC (permalink / raw) To: pgsql-bugs The following bug has been logged online: Bug reference: 5964 Logged by: Chris Curvey Email address: chris@chriscurvey.com PostgreSQL version: 9.0.3 Operating system: Linux (ubuntu 10.10 server 64-bit) Description: doc bug -- copy does not take "format" literal Details: in http://www.postgresql.org/docs/9.0/static/sql-copy.html, the documentation implies that you specify a format using the literal "format", followed by one of the literals "text", "csv" or "binary". Yet the following statement fails with "syntax error near 'format'" copy zipcode_stage from '/path/to/zip_codes.csv' format csv header delimiter e'\t'; and the following command (without 'format' succeeds) copy zipcode_stage from '/Users/chris/pgperf/data/zip_codes.csv' csv header delimiter e'\t'; ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #5964: doc bug -- copy does not take "format" literal @ 2011-04-03 16:46 Tom Lane <tgl@sss.pgh.pa.us> parent: Chris Curvey <chris@chriscurvey.com> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2011-04-03 16:46 UTC (permalink / raw) To: Chris Curvey <chris@chriscurvey.com>; +Cc: pgsql-bugs "Chris Curvey" <chris@chriscurvey.com> writes: > in http://www.postgresql.org/docs/9.0/static/sql-copy.html, the > documentation implies that you specify a format using the literal "format", > followed by one of the literals "text", "csv" or "binary". Quite. > Yet the following statement fails with "syntax error near 'format'" > copy zipcode_stage from '/path/to/zip_codes.csv' format csv header delimiter > e'\t'; That is the old-style syntax, which doesn't allow newer options such as FORMAT. Use copy zipcode_stage from '/path/to/zip_codes.csv' (format csv, header, delimiter e'\t'); If you can make any concrete suggestions about how to make the docs clearer about this, please do. regards, tom lane ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2011-04-03 16:46 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2011-04-03 00:44 BUG #5964: doc bug -- copy does not take "format" literal Chris Curvey <chris@chriscurvey.com> 2011-04-03 16:46 ` 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