Converting bytea to LargeObject - Mailing list pgsql-general

From Satish Burnwal (sburnwal)
Subject Converting bytea to LargeObject
Date
Msg-id 3A8C969225424C4D8E6BEE65ED8552DAB166BC@XMB-BGL-41C.cisco.com
Whole thread Raw
List pgsql-general

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

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Source RPMs for PostgreSQL 7.4.27 on RHEL4
Next
From: Devrim GÜNDÜZ
Date:
Subject: Re: Source RPMs for PostgreSQL 7.4.27 on RHEL4