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 1pMtXM-0002Gl-Mz for pgsql-general@arkaria.postgresql.org; Tue, 31 Jan 2023 16:31:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pMtXL-0001VM-KL for pgsql-general@arkaria.postgresql.org; Tue, 31 Jan 2023 16:31:11 +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 1pMtXK-0001SP-6T for pgsql-general@lists.postgresql.org; Tue, 31 Jan 2023 16:31:11 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pMtXE-0000a6-IV for pgsql-general@lists.postgresql.org; Tue, 31 Jan 2023 16:31:09 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 8E8515C00B7; Tue, 31 Jan 2023 11:31:01 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 31 Jan 2023 11:31:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1675182661; x= 1675269061; bh=7zRcWKNMjKarZGf//1vxPp28xfDMQmLo/mHh5606f2Y=; b=K NCdcqDaMPdJzbGXn7On1ZIbAyGzwiO2G0r+y5crJ8bkWE/2FZW789BXf74btpqvW AE9MVGguspYxPD1zu2FywaGRatp0tKYpD2/QPgn+ccbrc/mtIkww0hFv4vvr4wxF 5FNxlQA2jCNmLV2PU8kz6qZfZe8ni6I/IVV9dQ4NAQ3hifD8b/TFRt4Oa+qF5V3z nG0tPlr/6yP+qxyaUsF4pRk5ovo6qpws9HnaortZg4wcjb3Vy1dYI5sWIrh02Pv2 4gy4liBuTB9si0xgjJ5Ob6m5+Bw7ond2LX9gczo6fGRTGL/FPLvCi38/XElbpV8m BZCRCusU51ahZA8VAJw0g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1675182661; x=1675269061; bh=7 zRcWKNMjKarZGf//1vxPp28xfDMQmLo/mHh5606f2Y=; b=rdS6tS6M/W8njcNmN LMGZguhBHZ4drGPATbJ7Gvb9tnQFtBVwhkAq7lTZTwAp/3bXLNk+W+2o5fFSRy25 cXnDnE/x1E8F9nOVgVd0vIezd2BOdhsDWq1dA9MkRfYbTXd6FGz6ek7oHPrEi8/V i8sB4/8awl+wneRPPvCX0kZLXrOe4CQKD6SQdynA04L1125iaA7XinJFDKklFvw5 TWQ2UVRktJwRCbjhWdg76tk3u6PpgVrs6dl72hGcUbuRpP/v4h5FXFCEGG6Viet+ HIZOG87TvjicGu/RFaBEIFMKsimKNG5uzrpwR/BV9bDGzUfEj78LnZ4Mbg0IdHSL 53sMA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudefgedgkeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpedtveetkedvveehheegveevtdeggeetieeltddugeev tddtveehuddugfdvtdfhudenucffohhmrghinhepphhgrggumhhinhdrohhrghenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdr khhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 31 Jan 2023 11:31:00 -0500 (EST) Message-ID: <007fdd46-89a2-a40f-1e79-803c9d7c71b9@aklaver.com> Date: Tue, 31 Jan 2023 08:30:59 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: Download file from COPY ... TO with pgadmin To: Marco Lechner , "pgsql-general@lists.postgresql.org" References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/31/23 05:02, Marco Lechner wrote: > Hi, > > Using COPY …TO it is possible to store e.g. the “value” of a bytea cell > in a directory on the server. E.g. by this: > > COPY (SELECT content FROM d_doc WHERE id = 'x123456') TO > CONCAT('/tmp/mydoc.pdf’) (FORMAT binary); > > As we do not have access to the postgresql fileserver (ssh, …), but can > SELECT the value of the bytea cell, is It possible to download the bytea > directly into a file on a client computer when using pgadmin? Is there a > solution with the COPY … TO command, any pgadmin specific feature or any > other simple solution? Read the docs: https://www.pgadmin.org/docs/pgadmin4/6.19/import_export_data.html > > Regards > > Marco > > i.A. Dr. Marco Lechner > > Leiter Fachgebiet RN 1 │ Head RN 1 > > -- -- Adrian Klaver adrian.klaver@aklaver.com