Re: [GENERAL] NEWBIE: How do I use \copy to populate from a flat file - Mailing list pgsql-general

From Gene Selkov Jr.
Subject Re: [GENERAL] NEWBIE: How do I use \copy to populate from a flat file
Date
Msg-id 199903021958.NAA00711@mail.xnet.com
Whole thread Raw
In response to Re: [GENERAL] NEWBIE: How do I use \copy to populate from a flat file  ("K.T." <kanet@calmarconsulting.com>)
List pgsql-general
> I also think the ticks that Michael is talking about are required.  You can
> usually find more information about the "copy" error in the server.log
> (don't know where this is located on your system).

The file name must be enclosed in single closing quotes ('\047'). And
by the way, psql (if built with readline library) allows emacs-style
command line editing and can complete file names like bash does (I am
also wondering if it's possible to improve it to complete SGL keywords
and table names). I always use completion to make sure the file exists
and is accessible:

copy ENTRY from '/u1
<TAB>w
copy ENTRY from '/u1/w
<TAB>
copy ENTRY from '/u1/www/
<TAB><TAB> to see choices
....

';<CR>

BTW, what did you mean by '\copy'?


--Gene

pgsql-general by date:

Previous
From: "Gene Selkov Jr."
Date:
Subject: Re: [SQL] FW: indexing functions
Next
From: Chucka@freedomsystems.com
Date:
Subject: Broken Pipe?