Re: Redirecting select() output generates error

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Redirecting select() output generates error
Дата
Msg-id CAKFQuwYYqWZKuBratGFJJpV50C-oM-3UC55bV7g+r7FHLLqzPA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Redirecting select() output generates error  (Rich Shepard <rshepard@appl-ecosys.com>)
Ответы Re: Redirecting select() output generates error
Re: Redirecting select() output generates error
Список pgsql-general
On Monday, October 29, 2018, Rich Shepard <rshepard@appl-ecosys.com> wrote:
On Mon, 29 Oct 2018, Rich Shepard wrote:

But, when I try to redirect output to a disk file like this,
\o data-summary-by-form.txt
the result is an error:

  The \o came from a stackexchange thread I found with a web search. Within
psql the \? help command indicates there is no \o option, but \g should do
the same thing. It doesn't. I'm still confused on how to redirect output to
a file.

  A clue stick is needed.


You seem to need to distinguish between the command line options to psql and the meta commands that can be used within a script that is being executed by psql.

You should probably show all shell and commands and the psql script in full instead of bits and pieces.

This stuff does work and nothing you’ve shown as having executed is wrong so that error is coming from something you haven’t shown.

Read the psql documentation.

You can either use \out or \copy within psql script or redirect the shell output using shell features.

David J.

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

Предыдущее
От: Rich Shepard
Дата:
Сообщение: Re: Redirecting select() output generates error
Следующее
От: Rich Shepard
Дата:
Сообщение: Re: Redirecting select() output generates error