![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am using PostGreSQL 7.3.4 I would like to ask why the following code cannot get back what I have inserted before (abcdefghijklmnopqrstuvwxyz) correctly? I found a large object was created successfully by the code but the code content was empty. (select * from pg_largeobject ![]() (The "$conn has been tested and was found no problem accessing the database. It only fails to create large objects using Tcl) Thank you set objOid [pg_lo_creat $conn "INV_READ|INV_WRITE"] set fd [pg_lo_open $conn $objOid w] set buf abcdefghijklmnopqrstuvwxyz pg_lo_write $conn $fd $buf 26 pg_lo_close $conn $fd set fd2 [pg_lo_open $conn $objOid r] pg_lo_read $conn $fd2 buf2 26 puts stdout $buf2 pg_lo_close $conn $fd2 |
![]() |
| Thread Tools | |
| Display Modes | |
| |