Re: Why are stored procedures looked on so negatively?

Поиск
Список
Период
Сортировка
От Some Developer
Тема Re: Why are stored procedures looked on so negatively?
Дата
Msg-id 51EF27F6.3060601@googlemail.com
обсуждение исходный текст
Ответ на Re: Why are stored procedures looked on so negatively?  (John Meyer <johnmeyer@pueblocomputing.com>)
Ответы Re: Why are stored procedures looked on so negatively?  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Список pgsql-general
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.



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

Предыдущее
От: John Meyer
Дата:
Сообщение: Re: Why are stored procedures looked on so negatively?
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: Why are stored procedures looked on so negatively?