BYTEA

From: Eugene Yin <eugeneymail(at)ymail(dot)com>
To: Postgres List <pgsql-sql(at)postgresql(dot)org>
Subject: BYTEA
Date: 2016-01-17 19:33:38
Message-ID: 194527298.6807703.1453059218766.JavaMail.yahoo@mail.yahoo.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Do I  really Need to escape/encode binary data before sending to DB then do the reverse after retrieving the data?
If so, what (Java) codes should I use to achieve this goal (I am using the Java to interface with the DB)?

Thanks
Eugene

Responses

  • Re: BYTEA at 2016-01-17 20:29:08 from Adrian Klaver
  • Re: BYTEA at 2016-01-18 00:25:43 from Cat

Browse pgsql-sql by date

  From Date Subject
Next Message Adrian Klaver 2016-01-17 20:29:08 Re: BYTEA
Previous Message Eugene Yin 2016-01-17 19:26:34 Re: BLOBs