C-function and query

Поиск
Список
Период
Сортировка
От Martina Mostert
Тема C-function and query
Дата
Msg-id 3D5249CF.27820.1A36DD@localhost
обсуждение исходный текст
Ответы Re: C-function and query  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Oliver Elphick
Дата:
Сообщение: Re: "history" key in pgsql
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Trigger which fires on commit? (Multi-table intergrity constraint)