Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mUrnB-0006fM-9C for pgsql-admin@arkaria.postgresql.org; Mon, 27 Sep 2021 14:39:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mUrn9-0007qm-Vk for pgsql-admin@arkaria.postgresql.org; Mon, 27 Sep 2021 14:39:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mUrn9-0007qe-N1 for pgsql-admin@lists.postgresql.org; Mon, 27 Sep 2021 14:39:39 +0000 Received: from mailout.easymail.ca ([64.68.200.34]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mUrn7-0008Mg-8E for pgsql-admin@lists.postgresql.org; Mon, 27 Sep 2021 14:39:38 +0000 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id D779541FA0; Mon, 27 Sep 2021 14:39:35 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo03-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo03-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8RNfJP1HySfE; Mon, 27 Sep 2021 14:39:35 +0000 (UTC) Received: from smtpclient.apple (unknown [4.28.96.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 5B7F141F9F; Mon, 27 Sep 2021 14:39:35 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: copy to program with format binary From: Scott Ribe In-Reply-To: <81ba38c29879972e9ccb3025162ef1dfa8582b19.camel@cybertec.at> Date: Mon, 27 Sep 2021 08:39:34 -0600 Cc: pgsql-admin Content-Transfer-Encoding: quoted-printable Message-Id: <311C3978-05A3-4203-B9C5-C9DB552DAEEB@elevated-dev.com> References: <1BE15609-573B-4D14-906A-B9B360C7666D@elevated-dev.com> <81ba38c29879972e9ccb3025162ef1dfa8582b19.camel@cybertec.at> To: Laurenz Albe X-Mailer: Apple Mail (2.3654.120.0.1.13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thank you! I was staring at the docs and just totally missing the '('... Small oddity though, I tried the 'encoding' option same as I tried = format, without the parens, and it worked--which really threw me off. -- Scott Ribe scott_ribe@elevated-dev.com https://www.linkedin.com/in/scottribe/ > On Sep 27, 2021, at 8:33 AM, Laurenz Albe = wrote: >=20 > On Mon, 2021-09-27 at 08:24 -0600, Scott Ribe wrote: >> Are the "to program" and binary format not compatible? >>=20 >> copy msgs (msg) to program 'bzip2 > /...' with format binary >>=20 >> gives me a syntax error at "format" >>=20 >> Trying older-style syntax without "with" does the same thing. >=20 > The correct syntax is: >=20 > COPY msgs (msg) TO PROGRAM 'bzip2 > /...' WITH (FORMAT 'binary'); >=20 > Yours, > Laurenz Albe > --=20 > Cybertec | https://www.cybertec-postgresql.com >=20 >=20 >=20