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.
Chris travers
source share