Re: copy - Mailing list pgsql-novice

From Tom Lane
Subject Re: copy
Date
Msg-id 3739.1138719626@sss.pgh.pa.us
Whole thread Raw
In response to copy  (Clifton Zama <csz@jhb.ucs.co.za>)
List pgsql-novice
Clifton Zama <csz@jhb.ucs.co.za> writes:
> Please correct : copy tmp_table from supplier_merch.dat with delimiter '|';

> ERROR: parser: parse error at or near "table" at character 6.

Are you sure you transcribed the command accurately?  The only thing I
see wrong with it is that you didn't quote the file name, but the error
message is not pointing at that.  I can duplicate the error message by
inserting the word "table", eg

regression=# copy table foo from '/tmp/myfile';
ERROR:  parser: parse error at or near "table" at character 6
regression=#

BTW, syntax error messages have not been spelled this way since Postgres
7.3, so the server you are talking to is older than you think.  It's
certainly not PG 8.0.

            regards, tom lane

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Dynamic column names in plpgsql
Next
From: Tom Lane
Date:
Subject: Re: lost archives, alpha data files