Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: How to import CSV file?



On Tue, 28 Aug 2007, Chris Hoover wrote:

Why go through all of this when COPY can handle this for you?  All I need to
know is the syntax to tell copy that the strings are quoted by a single
quote.

Check out the docs here:

http://www.postgresql.org/docs/8.1/interactive/sql-copy.html

Probably you want to try something like:

COPY foo FROM '/tmp/foo' WITH CSV QUOTE AS '\'';

--
Jeff Frost, Owner 	<jeff(at)frostconsultingllc(dot)com>
Frost Consulting, LLC 	http://www.frostconsultingllc.com/
Phone: 650-780-7908	FAX: 650-649-1954



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group