Re: copy syntax

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Andy Chambers <achambers(at)mcna(dot)net>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: copy syntax
Date: 2012-04-04 20:04:26
Message-ID: 1333569866.2315.62.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2012-04-04 at 16:01 -0400, Andy Chambers wrote:
> dcm_eob=> copy ar_data from '/tmp/ar-data.csv' with header true;
> ERROR: syntax error at or near "true"
> LINE 1: copy ar_data from '/tmp/ar-data.csv' with header true;
>
> I can't figure out what's wrong with the syntax above. Is something missing?
>

Yes, you need parentheses, like this:

copy ar_data from '/tmp/ar-data.csv' with (header true);

--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com

In response to

  • copy syntax at 2012-04-04 20:01:19 from Andy Chambers

Browse pgsql-general by date

  From Date Subject
Next Message Greg Sabino Mullane 2012-04-04 20:07:02 Re: Leaky Perl / DBIx / Postgres 9.0.1 Trio
Previous Message Andy Chambers 2012-04-04 20:01:19 copy syntax