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 1mUrh7-0006If-PV for pgsql-admin@arkaria.postgresql.org; Mon, 27 Sep 2021 14:33:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mUrh5-0003uE-UR for pgsql-admin@arkaria.postgresql.org; Mon, 27 Sep 2021 14:33:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mUrh5-0003u5-Lh for pgsql-admin@lists.postgresql.org; Mon, 27 Sep 2021 14:33:23 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mUrh2-00044e-Qj for pgsql-admin@lists.postgresql.org; Mon, 27 Sep 2021 14:33:23 +0000 Received: by mail-wr1-x42a.google.com with SMTP id t18so52399275wrb.0 for ; Mon, 27 Sep 2021 07:33:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=P3ZmQGfMjqD1iTyq0zbIfilhOY/T3VfebT2rzBNT8gY=; b=6CClr8culxFhDiHiEQ24BzTr8rYMo2+wvzgEl8Kd+YjhgYoiaFEWlmH/PDW7JBA1Vp pZ9y9huX/82yvQlP5WYfuICqp1oG0dRof0lhw9UmfidsNCW3ZfB4VX2kjUrB0I4r58M3 pWoepT4Ke1Mmvdk6fQaOF5KVBEmJ87HlfYaC4RrrEX3BayWv9E8J4Odf+s9QZ7egbAry 24kvPj14Ak0UD0pD78FEuT0GXZN1+8HYGoTmyjgQXKcR1IUrbw5cXl5qdZwBrLh80xkr ajrrNotiuaYDC7uXp+5Xsm5hxz/4BX2MCImuxK5jZxQD1AqFPTSMLJjgZE+z73sfWsZ/ wMRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=P3ZmQGfMjqD1iTyq0zbIfilhOY/T3VfebT2rzBNT8gY=; b=BBDviF5KW+e8x053ircuZZQVOp4Oiqi6YpdI0cb9gQhjNGeaSDDuj++4VMbpuroIW/ 47ofBG937krRbv1hNqUVHYw76J+NM+Uclf4ZwWZ/3wpFqQXa3ThRcSghyWdV6gvFJSUi +753M9dUcEVX4C4HqHcY8iSscgkrBTqx5NblJdqtBDstXqrKS+qFPqktwrygHxeJObo8 lp+BpBY3PHIdIp6Y2iI9vLUEVPj7Kmc3SHziXbI+HZ8be/e07WW0H2S0j9YXCfjH0bGL YGbrrpzRq156eflHDk7N2XfOmUYxcybkSxGfbIDXmtGCCNTffrehp4UyGKWWP96EY/gz 43Mg== X-Gm-Message-State: AOAM533QuQBIFslKIoViODzUVESjPFcL5zeWxWLGIY7IPI2B0xLEEI7b W5aIyrSK6W8tQyhkFgOPoopKsjAoMj48fw== X-Google-Smtp-Source: ABdhPJxxlXMcYkwiDSLjhzOZx6WSSx8gHi5gcdFefh2EUZzLCLuUn9bzBKTal+k2u3XkZZWnp9CTsw== X-Received: by 2002:a5d:64e5:: with SMTP id g5mr181864wri.282.1632753199833; Mon, 27 Sep 2021 07:33:19 -0700 (PDT) Received: from localhost.localdomain (dynamic-e1ci3kh92wx9wd8rr-pd01.res.v6.highway.a1.net. [2001:871:5c:6970:fcf2:53c5:c7ec:61a7]) by smtp.gmail.com with ESMTPSA id f9sm185386wmf.3.2021.09.27.07.33.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 07:33:19 -0700 (PDT) Message-ID: <81ba38c29879972e9ccb3025162ef1dfa8582b19.camel@cybertec.at> Subject: Re: copy to program with format binary From: Laurenz Albe To: Scott Ribe , pgsql-admin Date: Mon, 27 Sep 2021 16:33:18 +0200 In-Reply-To: <1BE15609-573B-4D14-906A-B9B360C7666D@elevated-dev.com> References: <1BE15609-573B-4D14-906A-B9B360C7666D@elevated-dev.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2021-09-27 at 08:24 -0600, Scott Ribe wrote: > Are the "to program" and binary format not compatible? > > copy msgs (msg) to program 'bzip2 > /...' with format binary > > gives me a syntax error at "format" > > Trying older-style syntax without "with" does the same thing. The correct syntax is: COPY msgs (msg) TO PROGRAM 'bzip2 > /...' WITH (FORMAT 'binary'); Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com