dbTalk Databases Forums  

[BUGS] BUG #2823: API largeobject calls

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2823: API largeobject calls in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gregor
 
Posts: n/a

Default [BUGS] BUG #2823: API largeobject calls - 12-11-2006 , 04:44 PM







The following bug has been logged online:

Bug reference: 2823
Logged by: Gregor
Email address: gtm2 (AT) interia (DOT) pl
PostgreSQL version: 8.2, 8.1
Operating system: Windows
Description: API largeobject calls
Details:

Hello,
API funtions lo_open, lo_write, lo_import don't work.
While lo_create returns positive integr value ( and the record with this
loid is inserted into pg_largeobject table) lo_open return always zero
value
with when this non-zero positive loid value obtained from lo_create is
passed to lo_open. And lo_write returns -1 when this zero value obtained
from lo_open is passed to lo_write.

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #2823: API largeobject calls - 12-11-2006 , 06:59 PM






"Gregor" <gtm2 (AT) interia (DOT) pl> writes:
Quote:
API funtions lo_open, lo_write, lo_import don't work.
You need to do lo_open/lo_write/etc inside a transaction block, because
the LO handle returned by lo_open is only good until end of transaction.
(And yes, zero is a valid handle.) See the example program in the docs:
http://www.postgresql.org/docs/8.2/s...amplesect.html
and note the begin/commit commands it issues.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.