How to get PGconn inside a user-defined C function?

From: James Cribb <JamesC(at)zoom(dot)com(dot)au>
To: "'pgsql-general(at)postgreSQL(dot)org'" <pgsql-general(at)postgreSQL(dot)org>
Subject: How to get PGconn inside a user-defined C function?
Date: 2000-09-22 06:04:15
Message-ID: D10ACC8031A3FD47A7860D3590D6A1D10A465F@zoom-ads.zoomnet.zoom.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I want to write a C function I can call from SQL that operates on a large
object, but the lo_*() functions all take a PGconn* as the first argument,
and that is not passed to user-defined functions. How do I get the PGconn*
for the connection that is invoking the function? (I can't afford to open a
new connection every time the function is called.)

Browse pgsql-general by date

  From Date Subject
Next Message Elmar Haneke 2000-09-22 07:58:24 Re: replication
Previous Message Adam Haberlach 2000-09-22 05:11:39 Re: Re: Large Objects