Re: C-function and query - Mailing list pgsql-general

From Tom Lane
Subject Re: C-function and query
Date
Msg-id 2633.1028813246@sss.pgh.pa.us
Whole thread Raw
In response to C-function and query  ("Martina Mostert" <martina_mostert@gmx.de>)
Responses Re: C-function and query
List pgsql-general
"Martina Mostert" <martina_mostert@gmx.de> writes:
> As I didn't find any possibility to execute a query out of
> a c-function - which I would prefer - in the documentation
> (or am I wrong?)

SPI - see
http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/spi.html
There are usage examples in contrib.

> I tried
> to write a function in pl/pgsql that is executed by the
> trigger and does the query and that should pass the result
> to a c-function for the rest. But unfortunatly the function
> call of my c-function ends up in an error message. So does
> that mean that such a combination isn't allowed

No, it means there's a bug in your c function.

            regards, tom lane

pgsql-general by date:

Previous
From: Greg Copeland
Date:
Subject: SQL Comments
Next
From: Holger Klawitter
Date:
Subject: Re: double quotes in unicode dbs