BYTEA vs BLOB - Mailing list pgsql-sql

From Eugene Yin
Subject BYTEA vs BLOB
Date
Msg-id 1001118704.4351476.1452649506915.JavaMail.yahoo@mail.yahoo.com
Whole thread Raw
Responses Re: BYTEA vs BLOB
List pgsql-sql
Try to migrate from Oracle to Postgres (9.4.5) on Linux OS.

I have some photos stored in a table, to make it simple, the current (Oracle) table looks like:

test_tab (photo BLOB)
LOB ("photo") store as BASICFILE (tablespace "MYLOB" disable storage in row...

That disable storage in row will only allow a reference to be stored in the table while the actual BLOB data is stored outside the table, still inside the Oracle database, though (just NOT in the computer's file system).  When issue the delete from test_tab where id= 12345 lateron, the BLOB data will also get deleted, even if the BLOB value was stored out of the row at the first place.


Now if I migrate the Oracle table to Postgres and change the data type to BYTEA, how will the photo file (BYTEA) be stored?

1) The whole photo data will be stored inside the table?

Or

2) Only the reference to the data is stored inside the table, the data itself will be stored outside the table (but still within the database) for efficiency purpose?



Thanks to help.

Eugene


pgsql-sql by date:

Previous
From: Andreas Joseph Krogh
Date:
Subject: Re: BLOBs
Next
From: Michael Moore
Date:
Subject: best way sync data from Oracle to PostgreSQL?