Re: Calling lo_open within user defined C function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vincent Roberts <vroberts(at)emanon(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Calling lo_open within user defined C function
Date: 2001-06-12 06:32:05
Message-ID: 7886.992327525@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Vincent Roberts <vroberts(at)emanon(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-06-12 06:43:24 Re: large object implementation
Previous Message Andy Samuel 2001-06-12 05:20:59 large object implementation