From: | Eugene Yin <eugeneymail(at)ymail(dot)com> |
---|---|
To: | "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org> |
Subject: | BYTEA vs BLOB |
Date: | 2016-01-13 01:45:06 |
Message-ID: | 1001118704.4351476.1452649506915.JavaMail.yahoo@mail.yahoo.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Moore | 2016-01-13 16:37:26 | best way sync data from Oracle to PostgreSQL? |
Previous Message | Andreas Joseph Krogh | 2016-01-12 07:09:12 | Re: BLOBs |