Re: Query inside a C-Function

From: Joe Conway <mail(at)joeconway(dot)com>
To: Enzo Cappa <zcappa(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Query inside a C-Function
Date: 2010-03-19 19:41:05
Message-ID: 4BA3D351.8@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Broersma 2010-03-19 20:12:35 Re: [GENERAL] MS Access 2007 update write conflict problem & resolution
Previous Message Enzo Cappa 2010-03-19 19:26:15 Query inside a C-Function