Access to current database from C-language function

From: Achim Domma <domma(at)procoders(dot)net>
To: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Access to current database from C-language function
Date: 2011-07-25 11:40:45
Message-ID: 9533A207-2D9F-43B3-A7C4-07236B95AE4F@procoders.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I have read http://www.postgresql.org/docs/9.1/static/xfunc-c.html and my idea is, to write a C function which returns a set of rows. To generate the result set, I would like to access indexes directly using the information I found at http://www.postgresql.org/docs/9.1/static/indexam.html. But I don't get the idea how to glue both parts together!? Could somebody give me a starting point? How do I get a handle to the current database inside a C function?

cheers,
Achim

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2011-07-25 12:48:16 Re: Access to current database from C-language function
Previous Message pasman pasmański 2011-07-25 11:14:45 problem with compiling beta3 on mingw32+WinXP