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 1jJNrg-00028X-1e for pgsql-general@arkaria.postgresql.org; Tue, 31 Mar 2020 20:52:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jJNre-0006UU-RK for pgsql-general@arkaria.postgresql.org; Tue, 31 Mar 2020 20:52:02 +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 1jJNoX-0001V0-Pz for pgsql-general@lists.postgresql.org; Tue, 31 Mar 2020 20:48:49 +0000 Received: from athena.simkin.ca ([2607:f040:1001:2::ff:2]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJNoV-0007d8-5U for pgsql-general@lists.postgresql.org; Tue, 31 Mar 2020 20:48:49 +0000 Received: from skynet.simkin.ca (node-1w7jr9sr73xr4ze19xwgjcteu.ipv6.telus.net [IPv6:2001:569:bce0:6400:fa75:a4ff:fe2f:92e6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by athena.simkin.ca (Postfix) with ESMTPSA id D129DDC69704 for ; Tue, 31 Mar 2020 13:48:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.simkin.ca; s=athena; t=1585687723; bh=H8BbfDJZAEcdKyyVymCwb+US9jetdFPeae1QWKJoM5Y=; h=Subject:From:To:Date:From:To:Subject:Date:Reply-To; b=hvK0r+1XfDUxeda7ekvXi+s4CfzMEpDnGUDnkRk5v+q1CFEae6so3X6GsXje4H/om bBHT63BLKKiTSwD1UMSz0D0ULSptu03v/44xT82IH1tZr+cmXo4O+MqZHC0ARqTSbO hyevFVCbCj4vUp3a1ocqN2popON/9ltUg6/mL9+ZHYzEi8VziL0h7syPVtVUaBzxUh IaFRHjLRRymfMLXDQWgEXX9wqGwGYAMx5kVT0EzUq39m4jxOV/BCocyHLdT1SyJees Qid5IypRfrSsmGVaBab8KTeev6JYmgRCQPokbEjoj5NACaKu/zX5aRChF647g94Vhf XTxawiZZkI/pQ== Received: from skynet.simkin.ca (skynet.simkin.ca [IPv6:::1]) by skynet.simkin.ca (Postfix) with ESMTP id D6BDB105B1C8A for ; Tue, 31 Mar 2020 13:48:41 -0700 (PDT) Message-ID: <5e38b0f294ebca23aa19e7ad6409302481c1a447.camel@lists.simkin.ca> Subject: Re: keeping images in a bytea field on AWS RDS From: Alan Hodgson To: pgsql-general@lists.postgresql.org Date: Tue, 31 Mar 2020 13:48:41 -0700 In-Reply-To: References: Content-Type: multipart/alternative; boundary="=-paOg4mK7i6dDVkgpd7ED" X-PGP-Key: fp="EF82 6F8D A3BA A096 FFA3 05F2 A7A0 40A5 34E5 AA0B"; id="0x34E5AA0B"; get= User-Agent: Evolution 3.32.5 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --=-paOg4mK7i6dDVkgpd7ED Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On Tue, 2020-03-31 at 15:49 -0400, Richard Bernstein wrote: > I am using postgresql on RDS. I need to upload an image to the table. > I understand that I need to set the PGDATA directory and place the > image file in it, before setting the path in the bytea field. But how > do I set PGDATA if I don't have the ability to set an > environment variable, and don't have access to the following on an AWS > controlled installation? You don't put a file path into a bytea field or do anything with the database filesystem. You insert the contents of the actual file into the field using SQL commands. --=-paOg4mK7i6dDVkgpd7ED Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
On Tue, 2020-03-31 at 15:49 -0400, Richard Bernstein wrote:
<= blockquote type=3D"cite" style=3D"margin:0 0 0 .8ex; border-left:2px #729fc= f solid;padding-left:1ex">
I am using postgresql on RDS. I = need to upload an image to the table. I understand that I need to set the P= GDATA directory and place the image file in it, before setting the path in = the bytea field. But how do I set PGDATA if I don't have the ability to set= an environment variable, and don't have access to the following on an= AWS controlled installation?

You don= 't put a file path into a bytea field or do anything with the database file= system. You insert the contents of the actual file into the field using SQL= commands.
--=-paOg4mK7i6dDVkgpd7ED--