Re: triggers and functions in pgsql 7.0.2
От | Mike Mascari |
---|---|
Тема | Re: triggers and functions in pgsql 7.0.2 |
Дата | |
Msg-id | 39468422.646F4E45@mascari.com обсуждение исходный текст |
Ответ на | triggers and functions in pgsql 7.0.2 (Marc Britten <mbritten@cybernet-usa.com>) |
Список | pgsql-general |
Marc Britten wrote: > > I'm going through your docs trying to create a function and a trigger that > calls said function, what I've gotten so far is > > CREATE FUNCTION create_count_cache() > RETURNS opaque AS > ' > BEGIN; > DELETE FROM SnipCount; > INSERT INTO SnipCount SELECT LangID, COUNT(LangID) AS CNT FROM > snippet GROUP BY LangID; > COMMIT; > ' > LANGUAGE 'sql'; > > CREATE TRIGGER count_change > AFTER DELETE OR INSERT ON snippet FOR EACH ROW > EXECUTE PROCEDURE create_count_cache(); > > however LANGUAGE sql cannot return opaque and plpgsql is not a known lang > type. > > it seems that all your docs are a bit out of date, can you give me some help > please? > > marc britten The link below might help: http://www.postgresql.org/docs/programmer/xplang.htm#XPLANG-TITLE Hope that helps, Mike Mascari
В списке pgsql-general по дате отправления: