Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aKxdw-0001wD-Te for pgsql-sql@arkaria.postgresql.org; Mon, 18 Jan 2016 00:26:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aKxdw-00073N-Bn for pgsql-sql@arkaria.postgresql.org; Mon, 18 Jan 2016 00:26:00 +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.84) (envelope-from ) id 1aKxdu-00073E-TQ for pgsql-sql@postgresql.org; Mon, 18 Jan 2016 00:25:58 +0000 Received: from pecan-mail.exetel.com.au ([220.233.0.8] helo=pecan.exetel.com.au) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1aKxdo-0000B6-HF for pgsql-sql@postgresql.org; Mon, 18 Jan 2016 00:25:56 +0000 Received: from nessie.weebeastie.net ([220.233.7.36] helo=bunyip.billabong.weebeastie.net) by pecan.exetel.com.au with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.84) (envelope-from ) id 1aKxdh-0003wZ-Cy; Mon, 18 Jan 2016 11:25:45 +1100 Received: from hogarth by bunyip.billabong.weebeastie.net with local (Exim 4.84) (envelope-from ) id 1aKxdf-0000Ot-C0; Mon, 18 Jan 2016 11:25:43 +1100 Date: Mon, 18 Jan 2016 11:25:43 +1100 From: Cat To: Eugene Yin Cc: Postgres List Subject: Re: BYTEA Message-ID: <20160118002543.GC11533@zip.com.au> References: <194527298.6807703.1453059218766.JavaMail.yahoo.ref@mail.yahoo.com> <194527298.6807703.1453059218766.JavaMail.yahoo@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <194527298.6807703.1453059218766.JavaMail.yahoo@mail.yahoo.com> Organisation: Furball Inc. User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -1.1 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org On Sun, Jan 17, 2016 at 07:33:38PM +0000, Eugene Yin wrote: > Pg 9.4+ > Storing binary data using bytea or text data types > - Pluses > - Storing and Accessing entry utilizes the same interface when accessing any other data type or record. > - No need to track OID of a "large object" you create > > - Minus > > - bytea and text data type both use TOAST (details here) > - limited to 1G per entry > - 4 Billion (> 2KB) entries per table max. > > - Need to escape/encode binary data before sending to DB then do the reverse after retrieving the data > - Memory requirements on the server can be steep even on a small record set.  > https://wiki.postgresql.org/wiki/BinaryFilesInDB Would http://multicorn.org/foreign-data-wrappers/#idfilesystem-foreign-data-wrapper be of greater use? Not sure if it's r/w or r/o. -- "A search of his car uncovered pornography, a homemade sex aid, women's stockings and a Jack Russell terrier." - http://www.dailytelegraph.com.au/news/wacky/indeed/story-e6frev20-1111118083480 -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql