Re: Creating functions and triggers
От | Richard Huxton |
---|---|
Тема | Re: Creating functions and triggers |
Дата | |
Msg-id | 200305072018.35179.dev@archonet.com обсуждение исходный текст |
Ответ на | Creating functions and triggers ("Fontenot, Paul" <Paul.Fontenot@bannerhealth.com>) |
Список | pgsql-general |
On Wednesday 07 May 2003 5:32 pm, Fontenot, Paul wrote: > Is there a good, hold your hand type of tutorial or howto on creating > functions and triggers and using them together? I'm learning PostgreSQL > after spending years with MySQL and the information at > techdocs.postgresql.org - while good, is a little deep for me right now. > Specificly I would like to be able to read something that will tell me > how to create a function that will can run a shell script when certain > words are entered into a record. Thanks for your time and guidance. [blowing own trumpet] Try the "Postgresql Notes" (Automating Processes section) http://techdocs.postgresql.org/ (Quick Reference Material) or "A Brief Real-World Trigger Example" http://techdocs.postgresql.org/guides/ Both the above cover creating a plpgsql function and a trigger to call it. The first is older, but simpler. If you really want to call a shell script, check the mailing list archives and search for "shell" or "bash": http://archives.postgresql.org/ You'll also want to read up on pl/sh (or whatever it's called) - procedural shell stuff. Also perhaps look into pl/perl. I'd probably recommend having a long-lasting process LISTEN for NOTIFY messages rather than directly running shell scripts. -- Richard Huxton
В списке pgsql-general по дате отправления: