FUNCTION, TRIGGER and best practices

Поиск
Список
Период
Сортировка
От Keith Worthington
Тема FUNCTION, TRIGGER and best practices
Дата
Msg-id 20041217040520.M87972@narrowpathinc.com
обсуждение исходный текст
Ответы Re: FUNCTION, TRIGGER and best practices
Re: FUNCTION, TRIGGER and best practices
Список pgsql-novice
Hi All,

I have a function/trigger pair operating that move data from one table to
another after that data is inserted into the first table.

Can triggers and functions have the same name?
Is this a good practice?
Where should the function and trigger be stored?
In the same schema as the table they are connected to?

I will now be attempting to expand this function to move data from two source
tables to four or more target tables.  (Different source columns go to
different tables.)  Is it possible to do a transaction/commit/rollback inside
a function that is driven by a trigger so that if any portion of the transfer
fails it is all rolled back?

Thanks to all on this list that have helped me get this far. :-)

Kind Regards,
Keith

______________________________________________
99main Internet Services http://www.99main.com


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

Предыдущее
От: "Keith Worthington"
Дата:
Сообщение: Re: PERFORM statement question
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: FUNCTION, TRIGGER and best practices