I use the BLOB in an Oracle table to store IMG and document files. Now for Postgres(9.4.5), I have two options, i.e., BYTEA or OID.
With consideration of passing the params (SAVING) from the Java side as follows:
DiskFileItemDeepy file = myFile; InputStream is = null; long fileSize = 0; if (file != null && file.getFileSize() > 0){ is = file.getInputStream(); fileSize = file.getFileSize(); call.setBinaryStream(1, (InputStream)is, (long)fileSize);
}
...
call.execute();
//When retrieve the data use:
java.sql.Blob blob = (Blob) resultSet.getBlob(tableColumnName);
For the purpose mentioned above, which Postgres data type is a better candidate for replacement the BLOB, BYTEA or OID?
Thanks
Eugene
On Saturday, January 9, 2016 11:13 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Eugene Yin <
eugeneymail@ymail.com> writes:
My goodness, that's out of date (as you should have guessed from the
reference to "scheduled for an overhaul in summer 2000"). pg_dump
has been able to dump large objects just fine since 8.1 or so.
I don't know what else an Oracle user might be expecting that we don't
have, though, so I'm hesitant to change the text.
regards, tom lane
--
Sent via pgsql-sql mailing list (
pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql