Re: Query inside a C-Function - Mailing list pgsql-general

From Joe Conway
Subject Re: Query inside a C-Function
Date
Msg-id 4BA3D351.8@joeconway.com
Whole thread Raw
In response to Query inside a C-Function  (Enzo Cappa <zcappa@gmail.com>)
List pgsql-general
On 03/19/2010 12:26 PM, Enzo Cappa wrote:
> Hello!
>
> I have to make a c function for determining if some point its inside a
> set of elliptical geometries (I'm talking about a shared library, used
> like a function in the queries ). The geometries are defined in a table,
> so the function should iterate over a set of them. One option could be
> pass as a param to the funcition an array of HeapTupleHeader (if its
> posible), and other could be make a query inside the function for
> obtaining the geometries.
>
> I can't find the way of doing none of them, someone knows if it's
> posible? And, of course, information and links are needed too.

See the SPI functions:

http://www.postgresql.org/docs/8.4/interactive/spi.html

There are examples of use in the contrib/tablefunc code among others.

HTH,

Joe




Attachment

pgsql-general by date:

Previous
From: Enzo Cappa
Date:
Subject: Query inside a C-Function
Next
From: Richard Broersma
Date:
Subject: Re: MS Access 2007 update write conflict problem & resolution