Re: DEFERRABLE NOT NULL constraint
Albe Laurenz <laurenz.albe@wien.gv.at>
From: Albe Laurenz <laurenz.albe@wien.gv.at>
To: Bèrto ëd Sèra *EXTERN* <berto.d.sera@gmail.com>, Chris Angelico <rosuav@gmail.com>
Cc: "pgsql-general@postgresql.org" <pgsql-general@postgresql.org>
Date: 2013-02-05T13:47:11Z
Lists: pgsql-general
Bèrto ëd Sèra wrote: > > Why do that as a trigger, then? Why not simply call a procedure that > > generates the value and inserts it? > > Because this must be unknown to whoever makes the call and I'm not > supposed to expose any detail of what's going on behind the scenes. > Outsourcing part of sensitive apps also means that you do not want all > of the outside devs to know all that company X is doing, and how it is > doing it, sometimes. That sounds a bit contrived, but you could create a view and hide the processing in an INSTEAD OF INSERT trigger. Yours, Laurenz Albe