copy command

Поиск
Список
Период
Сортировка
От Jose' Soares Da Silva
Тема copy command
Дата
Msg-id Pine.LNX.3.96.980428153736.1796A-100000@proxy.bazzanese.com
обсуждение исходный текст
Список pgsql-hackers
Hi, all

PostgreSQL has two COPY commands to import/export data;

     copy [binary] <class_name> [with oids]
        {to|from} {<filename>|stdin|stdout} [using delimiters <delim>];
and...

     \copy table {from | to} <fname>

both of them work in a different way;
     In the first one you have to specify 'filename' surrounded by ''
     and if you don't specify an absolute pathname PostgreSQL uses
     $PGDATA/base/<databasename>/<filename>

     In the last one you have to specify 'filename' without by ''
     and if you don't specify an absolute pathname PostgreSQL uses
     current working directory.
     and last...  if you don't specify any parameter it show me this:

java=> \copy
connecting to new database: opy
PQexec() -- There is no connection to the backend.

Could not connect to new database. exiting

My question is:

       Why do we have two commands to doing the same operation ?
       Why are they different ?

                                                            Thanks, Jose'


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

Предыдущее
От: Michael Meskes
Дата:
Сообщение: Re: [HACKERS] initdb problem and operator question
Следующее
От: "Oliver Elphick"
Дата:
Сообщение: Re: [HACKERS] Re: Bug#21681: postgresql: Doesn't allow granting to www-data