Re: [GENERAL] NEWBIE: How do I use \copy to populate from a flat file

Поиск
Список
Период
Сортировка
От Gene Selkov Jr.
Тема Re: [GENERAL] NEWBIE: How do I use \copy to populate from a flat file
Дата
Msg-id 199903021958.NAA00711@mail.xnet.com
обсуждение исходный текст
Ответ на Re: [GENERAL] NEWBIE: How do I use \copy to populate from a flat file  ("K.T." <kanet@calmarconsulting.com>)
Список 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 по дате отправления:

Предыдущее
От: "Gene Selkov Jr."
Дата:
Сообщение: Re: [SQL] FW: indexing functions
Следующее
От: Chucka@freedomsystems.com
Дата:
Сообщение: Broken Pipe?