B
B
Boris Sadovskiy2014-12-07 23:19:21
PostgreSQL
Boris Sadovskiy, 2014-12-07 23:19:21

Which is better to use triggers or functions?

When you insert data into a table, you need to keep a history of changes in it.
How it is better to implement it?
Write a trigger that will call the function for adding records to the history table or immediately the function that you call? When called, such a function will insert data into the main table and write history to another table.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2014-12-08
Protko @Fesor

well it is logical that triggers are more reliable than separately to pull function.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question