Re: Alternative to \copy in psql modelled after \g

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: Alternative to \copy in psql modelled after \g
Дата
Msg-id 0994a8d8-9837-4824-b659-55de6f3a7bdf@manitou-mail.org
обсуждение исходный текст
Ответ на Re: Alternative to \copy in psql modelled after \g  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Alternative to \copy in psql modelled after \g  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-hackers
    David G. Johnston wrote:

> Do I understand correctly that you are proposing a slightly less
> verbose alternative of:
>
> \o :filename
> COPY TO STDOUT
> \o

Not strictly the same because of this:

\o or \out [ filename ]
....
  “Query results” includes all tables, command responses, and notices
  obtained from the database server, as well as output of various
  backslash commands that query the database (such as \d); but not
  error messages.

If for instance psql received a notification between the two \o it would
end up in the file, which it wouldn't with \copyto.
The same is true for  SELECT... \g file as opposed to \o file

Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite


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

Предыдущее
От: "Daniel Verite"
Дата:
Сообщение: Re: csv format for psql
Следующее
От: Jürgen Strobel
Дата:
Сообщение: BUG #15212: Default values in partition tables don't work as expectedand allow NOT NULL violation