From: | Kurt Seel <kseel(at)utcorp(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | problem: using large objects from tcl |
Date: | 1998-05-29 19:07:33 |
Message-ID: | 356F0775.41C67EA6@utcorp.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I am trying to use large objects from TCL. May I don't read the man
page right ...
TCL code:
#!/usr/local/pgsql/bin/pgtclsh
set CONN [pg_connect nccbor]
puts "create : [set LOID [pg_lo_creat $CONN "INV_READ|INV_WRITE"]]"
puts "open (w): [set LOFD [pg_lo_open $CONN $LOID w]]"
set STR "sdlfkjhlskdjfh lakjdhfljkadsfhlkjas"
set SIZ [string length $STR]
puts "write : [pg_lo_write $CONN $LOFD $STR $SIZ]"
puts "close : [pg_lo_close $CONN $LOFD]"
puts "open (r): [set LOFD [pg_lo_open $CONN $LOID r]]"
puts "read : [pg_lo_read $CONN $LOFD STR 10240]"
puts $STR
puts "close : [pg_lo_close $CONN $LOFD]"
pg_disconnect $CONN
Output of code :
./test_lo.tcl
create : 93377
open (w): 0
write : 35
close : -1
open (r): -1
read : -1
oid
close : -1
Does anyone know what I've done wrong?
--
the four stages of competence:
1 unconscious incompetence:
I don't even know that I don't know how to do X
2 conscious incompetence
I do know that I don't know how to do X
3 conscious competence
I do know how to X, but I have to think about it
4 unconscious competence
I know how to X and I do it without thinking about it
(Think of e.g. driving a car)
Kurt Seel, Systems Engineer
Unified Technologies Corp.
Phone : 610 964 8200
Email : kseel(at)ut{anti-spam]corp(dot)com
To send me email, remove the {anti-spam] from the above address.
From | Date | Subject | |
---|---|---|---|
Next Message | Billy Donahue | 1998-05-29 21:37:14 | Re: [GENERAL] primary key attribute |
Previous Message | Joao Paulo Felix | 1998-05-29 18:29:24 | primary key attribute |