Converting bytea to LargeObject

Started by Satish Burnwal (sburnwal)about 16 years ago1 messagesgeneral
Jump to latest
#1Satish Burnwal (sburnwal)
sburnwal@cisco.com

I am also having the problem as mentioned in
http://archives.postgresql.org/pgsql-general/2009-01/msg00771.php.

However, the sql statement:

UPDATE tbl SET newoid = (

SELECT oid FROM (

SELECT oid, lowrite(lo_open(oid, 131072), byteafield)

FROM lo_create(0) o(oid)) x);

This is not working for me:

- it is putting same newoid for all the records in the table whereas
what is needed is separate oid for each record. Lo_create(0) seems to be
taken for all the records.

- can you pls explain the syntax o(oid) ? I do not see any documentation
for this.

Thanks

Satish