Re: How to import CSV file?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Frost <jeff@xxxxxxxxxxxxxxxxxxxxxx> writes:
> 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.

> Probably you want to try something like:
> COPY foo FROM '/tmp/foo' WITH CSV QUOTE AS '\'';

Actually I'd recommend WITH CSV QUOTE AS '''' ... the backslash syntax
is nonstandard and will bite you eventually.  Doubled quote works in
every version of PG.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux