0

my application datbase in postgressql and from the document i understand that it store few data in a blob and from the table i can only get the oid of it.

is there any possibility to read the content from these blobs? if yes, could someone share the knowhow?

1
  • In most of the cases bytea is the better choice to store blobs. Commented Oct 20, 2015 at 10:10

1 Answer 1

1

From the OID, a file with the contents of the large object can be exported.

Either client-side (psql):

  \lo_export oid-to-export /path/to/a/file

Or server-side in SQL (creates the file on the server, beware that postgres must have the permission to write into the destination directory).

   SELECT lo_export(oid-to-export, '/path/to/a/file');
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.