C-function and query

From: "Martina Mostert" <martina_mostert(at)gmx(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: C-function and query
Date: 2002-08-08 08:37:03
Message-ID: 3D5249CF.27820.1A36DD@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

For our database for project-management I need a function
which on the one hand is able to do a query on a table and
on the other hand can search for files outside the database
somewhere in the directories of the computer. This function
has to be executed by a trigger.
Because I'm well known to c/c++, which is also a kind of
standard with us, I'd like to use a c-function for the
directory job.
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?) 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 or is there
anything special I have to care for when executing a
c-function out of a pl/pgsql function? I used the version-1
calling conventions for the c-function, compiled and linked
it as a dynamically-loaded function and registered it
with create function in the database.

If that all doesn't work, is there any other possibility
for solving the problem?

Thanks

Martina

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2002-08-08 08:48:13 Re: Trigger which fires on commit? (Multi-table intergrity constraint)
Previous Message Oliver Elphick 2002-08-08 08:35:13 Re: "history" key in pgsql