Skip site navigation (1) Skip section navigation (2)

problem: using large objects from tcl

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
I am trying to use large objects from TCL. May I don't read the man
page right ...
 TCL code:


	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 :

create : 93377
open (w): 0
write : 35
close : -1
open (r): -1
read : -1
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.

pgsql-general by date

Next:From: Billy DonahueDate: 1998-05-29 21:37:14
Subject: Re: [GENERAL] primary key attribute
Previous:From: Joao Paulo FelixDate: 1998-05-29 18:29:24
Subject: primary key attribute

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group