Re: cannot set view triggers to replica

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: cannot set view triggers to replica
Date: 2015-05-31 09:36:42
Message-ID: CAEZATCWgChXSvcSjgGzngJRTTATRwk4SpipGjVCS1DDAxwLxGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 30 May 2015 at 03:47, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> It appears to be an omission that ALTER TABLE ... ENABLE TRIGGER and
> similar commands don't allow acting on views, even though we now have
> triggers on views.
>

It was deliberately omitted from the original INSTEAD OF triggers
patch because it didn't seem that useful (and to keep the patch size
down), see:

http://www.postgresql.org/message-id/flat/AANLkTimJw47yZHnxKhMNLCFES=W-sMrqpRe7aj8YBKds(at)mail(dot)gmail(dot)com#AANLkTimJw47yZHnxKhMNLCFES=W-sMrqpRe7aj8YBKds@mail.gmail.com

That said, I have no objection to allowing it if you think it's likely
to be useful. I think you will need to work a little harder to make it
work properly though. Consider, for example, how
view_has_instead_trigger() and its callers, and CheckValidResultRel()
should behave if the triggers are disabled.

Regards,
Dean

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2015-05-31 11:15:38 Re: [CORE] postpone next week's release
Previous Message Pavel Stehule 2015-05-31 04:33:09 Is there some possibilities to take info about login mapping inside session?