Re: COPY form stdin and file

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: COPY form stdin and file
Дата
Msg-id 45EBDF99.2090404@archonet.com
обсуждение исходный текст
Ответ на COPY form stdin and file  ("senges" <csengstock@gmail.com>)
Список pgsql-general
senges wrote:
> Hi all,
> when untaring a pg_dumped tar file the data gets populated like this:
>
> -----------------
> COPY mytable (id, attr1, attr2) FROM stdin;
> \.
> copy mytable (id, attr1, attr2)  from '$$PATH$$/2387.dat' ;
> -----------------
>
> where $$PATH$$ gets replaced by the current path.
>
> Anyone knows whats the aim of this ?
> The ".\" throws an error within the pgadmin sql query window:
> ERROR:  syntax error at or near "\" at character

The "\." on a separate line ends the COPY ... FROM stdin above it.

I'm not sure pgadmin has a "stdin" to process data from though.

pg_restore is probably the tool you want to use.

--
   Richard Huxton
   Archonet Ltd

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: COPY form stdin and file
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: date format