Re: Problems with \copy and delimiters ',' - Mailing list pgsql-general

From Tom Lane
Subject Re: Problems with \copy and delimiters ','
Date
Msg-id 6086.1074282717@sss.pgh.pa.us
Whole thread Raw
In response to Problems with \copy and delimiters ','  (Bill Moran <wmoran@potentialtech.com>)
Responses Re: Problems with \copy and delimiters ','
List pgsql-general
Bill Moran <wmoran@potentialtech.com> writes:
> I want to do this
> \copy table_name from 'table_name.cdf' delimiters ',';

> But I get:
> \copy: parse error at "delimiters"

Looking at the psql code, it evidently wants "with delimiter" ...

regression=# \copy table_name from 'table_name.cdf' with delimiter ','
table_name.cdf: No such file or directory

> The documentation I've found on \copy says to see the docs on copy ;)

It's *supposed* to match the backend syntax, but seems a few bricks
shy of a load at the moment.  Anyone feel like fixing it?  See
parse_slash_copy() in src/bin/psql/copy.c.

            regards, tom lane

pgsql-general by date:

Previous
From: merlyn@stonehenge.com (Randal L. Schwartz)
Date:
Subject: Re: Newbie to Postgres - Urgent query
Next
From: Tom Lane
Date:
Subject: Re: plpythonu AKA am I crazy? or....