Re: Calling lo_open within user defined C function - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Calling lo_open within user defined C function
Date
Msg-id 7886.992327525@sss.pgh.pa.us
Whole thread Raw
In response to Calling lo_open within user defined C function  (Vincent Roberts <vroberts@emanon.net>)
List pgsql-hackers
Vincent Roberts <vroberts@emanon.net> writes:
> I notice that the lo_create and lo_open functions require a postgres
> connection (PGConn)

Those are the client-side functions; naturally they need a connection
to the backend.  For the server-side functions, look in
src/backend/libpq/be-fsstubs.c.  For that matter, since you seemingly
don't need to hold an open LO reference except within your function,
you might find it easiest to work directly with the underlying
inv_create &etc layer of functions.  See lo_export and lo_import in
be-fsstubs.c for inspiration.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Andy Samuel"
Date:
Subject: large object implementation
Next
From: Tom Lane
Date:
Subject: Re: large object implementation