Re: DEFERRABLE NOT NULL constraint

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: Bèrto ëd Sèra *EXTERN* <berto(dot)d(dot)sera(at)gmail(dot)com>, Chris Angelico <rosuav(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: DEFERRABLE NOT NULL constraint
Date: 2013-02-05 13:47:11
Message-ID: A737B7A37273E048B164557ADEF4A58B057AFD06@ntex2010a.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bèrto ëd Sèra 2013-02-05 13:51:09 Re: DEFERRABLE NOT NULL constraint
Previous Message Bèrto ëd Sèra 2013-02-05 13:44:40 Re: tablespace directories