On 24/07/13 01:55, John Meyer wrote:
Taking an absolutist position either way is pretty blind.   What is the
purpose of the procedure?  Is it enforcing business rules?  Are these
rules that must be enforced against already existing data or are they
more akin to validation of a credit card.  How many people are accessing
your database at one time?  And most importantly, what are you best at?

Basically what happens is an object is created in the application and saved to the database. When the insert has completed I need to start a process immediately based on the information in the object on another server (Amazon Simple Message Queue to be precise).

So basically I'll have a trigger function that fires on INSERTs and does this work. That way the action will only be performed on INSERTs that have successfully completed and I can be sure that the trigger will always fire.

On top of that there are a few common data structures that need to be written to the database that would be perfect for stored procedures since there is a little logic involved in saving them which shouldn't really be exposed to the application developers.



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to