From: | Thomas Kellerer <spam_eater(at)gmx(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Binary Large Objects (LOB/BLOB) in Hibernate and JDBC: Unresolved issues |
Date: | 2012-01-08 17:43:04 |
Message-ID: | jeckhp$q0d$1@dough.gmane.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-jdbc |
Stefan Keller wrote on 06.01.2012 19:04:
> I maintain images (from Webcams). In the Java and Hibernate (JPA) code
> I specified a @Lob annotation on class MyData and a attribte/data type
> "byte[] mydata;". Hibernate then generates two tables in PostgreSQL,
> one called MyData with a column mydata of type oid and an internal one
> called pg_largobjects (which contain foreign keys to the oid). That's
> also explained in the JDBC docs [1], saying "PostgreSQL provides two
> distinct ways to store binary data. Binary data can be stored in a
> table using the data type bytea or by using the Large Object feature
> which stores the binary data in a separate table in a special format
> and refers to that table by storing a value of type oid in your
> table."
I think you are better off using bytea unless you need to access only parts of the blob regularly.
From | Date | Subject | |
---|---|---|---|
Next Message | Francisco Figueiredo Jr. | 2012-01-08 18:12:41 | Re: Is there a reason why Postgres doesn't have Byte or tinyint? |
Previous Message | Stefan Keller | 2012-01-08 17:08:09 | Re: Binary Large Objects (LOB/BLOB) in Hibernate and JDBC: Unresolved issues |
From | Date | Subject | |
---|---|---|---|
Next Message | Stefan Keller | 2012-01-08 18:13:07 | Re: Re: Binary Large Objects (LOB/BLOB) in Hibernate and JDBC: Unresolved issues |
Previous Message | Stefan Keller | 2012-01-08 17:08:09 | Re: Binary Large Objects (LOB/BLOB) in Hibernate and JDBC: Unresolved issues |