Problems when opening large objects in the server side.

From: Jose Antonio Cotelo lema <Jose-Antonio(dot)Cotelo-Lema(at)FernUni-Hagen(dot)de>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Problems when opening large objects in the server side.
Date: 1999-09-22 08:47:36
Message-ID: 37E897A8.31C944F@fernuni-hagen.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hi!

My problem is that I am defining a user data type that stores some
information in a large object (inversion object). If I compile the code
of such data type as part of a stand alone program (comunicating with
the PostgreSQL server usign libpq), I am able to create the large object
but I get an error when trying to open it.
After searching in recopilations of newsgroups emails, I know that in
this case what I need to do is to execute the "begin" command (using
pqexec()) before opening the large object, because any access to a large
object must be enclosed into a transaction. If I do so, I get my data
types working propertly and being able to open the large objects that
they use.
But my problem is that I do not want to use my data types in a
stand alone program, but added to the PostgreSQL server as new user data
types. An the problem in this case is that I can not execute the "begin"
command in the code of my data types in this context: first because it
would be definetly wrong if the code of the data type defines where
should start or end a transaction (the program accessing the database or
the user if working interactively are the only that should do it), and
second because in this case the call to pgexec() with the command
"begin" fails (with some error mesage saying that there was a parsing
error).

So, my question is: What do I need to do for solve this problen and
being able to use large objects in my user data types, taking into
account that their code should be executed in the server side?

Thanks in advance,
Tony.

--
Jose Antonio Cotelo Lema. | Jose-Antonio(dot)Cotelo-Lema(at)FernUni-Hagen(dot)de
Praktische Informatik IV. Fernuniversitaet Hagen.
D-58084 Hagen. Germany.

Browse pgsql-interfaces by date

  From Date Subject
Next Message Jelle Ruttenberg 1999-09-22 09:41:21 Re: [INTERFACES] Q: Mac: Openlink->Linux: Openlink-PostgreSQL
Previous Message Dave Page 1999-09-22 07:45:41 Changing User Passwords