Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gHDQX-0003sE-AO for pgsql-general@arkaria.postgresql.org; Mon, 29 Oct 2018 19:42:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gHDQV-0006t7-4h for pgsql-general@arkaria.postgresql.org; Mon, 29 Oct 2018 19:42:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gHDQU-0006t0-Sk for pgsql-general@lists.postgresql.org; Mon, 29 Oct 2018 19:42:14 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gHDQR-0006w6-4T for pgsql-general@postgresql.org; Mon, 29 Oct 2018 19:42:14 +0000 Received: by mail-pf1-x432.google.com with SMTP id z2-v6so1959713pfe.2 for ; Mon, 29 Oct 2018 12:42:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=ot4QswSLhQpMJWpFnwCmypzOuxQObES14ohAkHRdV70=; b=HytQ14N8hEeVLE5MORLPopF01gs+x0OGKdcTE6bLQSN3NUPAL4bY1NS9KYC0Auiby3 YUGm8P7fcCx3RsjMgcFQ6o40S7wc02pJd4b2GhTRFChldnlpj9i8fhatfyPDBwxYsatS pwT8X6SBy453x4gGAaysJAQ3qw4dXWqG8F3VsjrIigPHpMraGFXr7dyd0OR0zAL1+Scj O6XoW2sKK9AxPPb/+N7u9oDf35L38BNDeb6Tnt9PhsQT2S8AdFZcbm/gkB2rsf0s3HUv aTnKoktEry0UdM92nGcE8Vp9XTi3310r4nzSdVbIskSbjEi6MOwD1KlZ2lMG4jL4aD7U mVbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=ot4QswSLhQpMJWpFnwCmypzOuxQObES14ohAkHRdV70=; b=O4z0MsHzuqHCqYurbFbm5aGmifrNdipY4q4QsBRlm9P+76fkgQOtTV4w0AU3Zr4lgP sDaDEGDXxHFEmuhek9cCO0njXUyVozSFgvLdPJKfPD7cmmyGeezLzNexvCehCTFpEx8y dvOsi8TE2LpJAjvdlGEFsbnsgVPCvqb88FLFQymqr1IeSzwcuNv2VHdQmC6ERAKeP0Ma XzSJacJsbkuErTNd01nA0/YqDjOLR0YDLv4TLus9shtamJryel5EblEuT69+vkXtqK0q EXeUzSWo9hxxefMnRKJdkk1ypELpwhbhI0Ka5fIM7OWwBB9QBJL5I8Q/cJnpyZnYJO4V DLSA== X-Gm-Message-State: AGRZ1gJszDasLCrEjeTNHi6O0IVmtsAiS3/Ok5VRrILQLkzCegjUM+k5 8nvCc1Xeu5M4dQ/X8I2sT1g= X-Google-Smtp-Source: AJdET5egbyiuV2M7fKdKkFjcOXOS13RGquees3J7L0+iZhHwCkW+vu0nrbaRvc4rawv8VIoHM6rlYA== X-Received: by 2002:a63:4384:: with SMTP id q126mr14879521pga.160.1540842128541; Mon, 29 Oct 2018 12:42:08 -0700 (PDT) Received: from kitselas.hci.utah.edu ([155.100.47.0]) by smtp.gmail.com with ESMTPSA id g25-v6sm21942696pgg.73.2018.10.29.12.42.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 12:42:07 -0700 (PDT) From: Rob Sargent Message-Id: <6BE9C863-5489-4D63-B8C2-C6CB47758505@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_1648D91D-733E-4357-A366-A21456D963C5" Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) Subject: Re: Redirecting select() output generates error Date: Mon, 29 Oct 2018 13:42:06 -0600 In-Reply-To: Cc: Rich Shepard , "pgsql-general@postgresql.org" To: "David G. Johnston" References: X-Mailer: Apple Mail (2.3445.100.39) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_1648D91D-733E-4357-A366-A21456D963C5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Oct 29, 2018, at 1:37 PM, David G. Johnston = wrote: >=20 > On Mon, Oct 29, 2018 at 12:30 PM Rich Shepard = > wrote: > willamette-river-hg-# \out data-summary-by-form.txt > willamette-river-hg-# 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; >=20 > The "-#" prompt in psql means you are in line continuation mode. The = \out meta-command should be issued while sitting at an initial prompt = "=3D#". >=20 > Being in line-continuation mode means you are typing something else = above it that doesn't constitute a full command - and you are still not = showing us what that is. This is the reason I asked for basically a = self-contained example. >=20 > David J. >=20 Being inside emacs buffer has nothing to do with the problem. I do it = all the time. As David points out, continuation in play. --Apple-Mail=_1648D91D-733E-4357-A366-A21456D963C5 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

On Oct 29, 2018, at 1:37 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:

On Mon, Oct = 29, 2018 at 12:30 PM Rich Shepard <rshepard@appl-ecosys.com> wrote:
willamette-river-hg-# \out data-summary-by-form.txt
willamette-river-hg-# 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;

The "-#" prompt in psql = means you are in line continuation mode.  The \out meta-command = should be issued while sitting at an initial prompt "=3D#".

Being in = line-continuation mode means you are typing something else above it that = doesn't constitute a full command - and you are still not showing us = what that is.  This is the reason I asked for basically a = self-contained example.

David J.

Being inside emacs buffer has nothing to do = with the problem. I do it all the time.  As David points out, = continuation in play.

= --Apple-Mail=_1648D91D-733E-4357-A366-A21456D963C5--