I need and example for getting jpg file which stored as large object in postgresql and setting as pixmap.

Normally i write to a file and set pixmap. Is it possible on the fly?