"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