I understand that PostgreSQL writes BLOB content to a separate table, but is there any way to view the blob contents in an easy and convenient way from inside pgAdmin?
I am not sure what you mean by "easy and convenient" but the best you can do is lo_read(...)
This presents the lob
as a bytea
.
This is easy and convenient in the sense of getting data out but you pgAdmin won't convert from an escaped string back into the original binary for you so you are left looking at the textual representation of the binary, so it is not "easy and convenient" if you want to show the image contained in a lob when that is in png format or anything.
Stupidfrog
SELECT encode(blobdata::bytea, 'escape') FROM table as o where o.blobdata != ''
where
- blobdata is the bytea column (blob)
- "table" is the table that contains the column blobdata
来源:https://stackoverflow.com/questions/14875748/pgadmin-iii-how-to-view-a-blob