a simple trigger?

Поиск
Список
Период
Сортировка
От Nguyen , Nguyen
Тема a simple trigger?
Дата
Msg-id 75256BFE0332D4118969009027E77E7C24FE2B@static-5-14.dhcp.nai.com
обсуждение исходный текст
Список pgsql-general
hello,

i have created a trigger that executes a c function, foo(), after something
is inserted into my table.  foo() is supposed to simply write a string to
some file.  but after i do an INSERT, nothing is written.
i compiled the source file:
gcc -fPIC -g -c a.c
and then made a shared library:
gcc -shared -W1 -soname,mylib1.so.1 -o mylib1.so.1.0.1 a.o -lc
then i created the function before i created my trigger.
so what am i doing wrong?

i also tried creating a raw psql function (CREATE FUNCTION...) for my
trigger to call, but when i tried creating the trigger, it complained: the
function has to return an opaque type.  but sql functions can't return type
opaque.  what do i do?

i would appreciate any help anyone could give me.

thanks,
nguyen
da79c@hotmail.com



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Selects in server side functions
Следующее
От: The Hermit Hacker
Дата:
Сообщение: Re: 7.1 release date ?