PgAdmin III: How to view drops?

I understand that PostgreSQL writes BLOB contents to a separate table, but is there a way to view blob contents in a simple and convenient way from within pgAdmin?

+7
source share
2 answers

I'm not sure what you mean by “simple and convenient,” but the best you can do is lo_read(...)

Here is lob as a bytea .

It’s easy and convenient in terms of receiving data, but you will not convert pgAdmin from the escaped string back to the source binary for you, so you will stay on the text representation of the binary, so it’s not “easy and convenient” if you want to display the image contained in lob when it is in png format or something else.

+1
source
 SELECT encode(blobdata::bytea, 'escape') FROM table as o where o.blobdata != '' 

Where

  • blobdata is a column bytea (blob)
  • "table" is a table containing blobdata columns li>
+12
source

All Articles