large objects

From: Lauri Posti <lauri(at)peak(dot)edu(dot)ee>
To: pgsql-interfaces(at)postgresql(dot)org
Cc: pgsql-general(at)postgresql(dot)org
Subject: large objects
Date: 1999-06-30 18:39:28
Message-ID: Pine.LNX.3.96.990630181833.5238E-100000@vi.eenet.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-interfaces

Hi!

I've been trying to get postgres LO interface to work with python.

I have been successful with three configurations:
1) pgsql 6.4.2 & PyGreSQL 2.2 on Linux/x86
2) pgsql 6.5beta1 & PyGgeSQL 2.3 on Linux/x86
3) pgsql 6.5beta1 & PyGreSQL 2.3 on SPARC/Solaris 2.6

And failed with all other:
* 6.5beta2 ... 6.5 final on SPARC/Solaris 2.6 and Linux/x86 with PyGreSQL
2.3 & 2.4 in any combination.

* 6.4.2 on SPARC/Solaris 2.6 with PyGreSQL 2.2 .. 2.4

What i rally need is to get something to work on SPARC/Solaris. The only
vesrion taht has worked is 6.5beta1 but I can't find it anywhere.

with 6.4.2 & PyGreSQL on Solaris (on x86 linus it is ok) the problem is
following:
$python
Python 1.5.2 (#5, Jun 30 1999, 20:15:59) [GCC egcs-2.91.66 19990314
(egcs-1.1.2 on sunos5
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> from pg import *
>>> c=connect()
>>> o=c.locreate(INV_WRITE)
>>> o.open(INV_WRITE)
>>> o.oid
21089
>>> o.close()
>>> o2=c.locreate(INV_WRITE)
>>> o2.open(INV_WRITE)
>>>
>>> o2.write("hello")
>>> o2.close()
Traceback (innermost last):
File "<stdin>", line 1, in ?
IOError: error while closing large object fd.
>>>

and 6.5 on both Solaris $ Linux the problem is folllowing:
[postgres(at)liha pgsql]$ python
Python 1.5.2 (#3, Jun 13 1999, 23:57:46) [GCC egcs-2.91.66 19990314/Linux
(egcs- on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> from pg import *
>>> con=connect("testdb","",5432,"","","koll","koll")
>>> lo=con.locreate(INV_WRITE)
>>> lo.oid
18593
>>> lo.open(INV_WRITE)
Traceback (innermost last):
File "<stdin>", line 1, in ?
IOError: can't open large object.
>>>
and backend says:
ERROR: lo_lseek: invalid large obj descriptor (0)

Any ideas?

Thanks in advance,
Lauri

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephen Boyle 1999-06-30 20:44:05 Postgres Upsizing Tool for MSAccess 97
Previous Message Peter Eisentraut 1999-06-30 18:02:35 Re: [GENERAL] JOIN exclusion problem

Browse pgsql-interfaces by date

  From Date Subject
Next Message Byron Nikolaidis 1999-06-30 18:51:09 Re: [INTERFACES] Use Declare/Fetch option
Previous Message Ken J. Wright 1999-06-30 18:30:23 Re: [INTERFACES] fetching way too much or too often???