Re: Redirecting select() output generates error

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Redirecting select() output generates error
Date: 2018-10-29 19:21:16
Message-ID: alpine.LNX.2.20.1810291217500.17057@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 29 Oct 2018, David G. Johnston wrote:

> 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.

David,

I'm running psql in a shell buffer within emacs, not at the shell prompt. The entire script is:

\o data-summary-by-form.txt
select param, site_nbr, sampdate, min(quant), max(quant), unit from concentrations group by param, site_nbr, sampdate, unit order by param, site_nbr, sampdate, unit;
\o

This generates the error.

Other backslash commands, such as \d <tablename> work, but both \o and \g
produce the error when followed by the select command.

Rich

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2018-10-29 19:28:34 Re: Redirecting select() output generates error
Previous Message David G. Johnston 2018-10-29 19:06:37 Re: Redirecting select() output generates error