From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com> |
Cc: | basti <mailinglist(at)unix-solution(dot)de>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Conditional INSERT |
Date: | 2019-03-16 00:41:20 |
Message-ID: | 18a75d30-85f4-becd-7a78-43b5315fd298@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 3/15/19 5:19 PM, Ken Tanzer wrote:
>
>
> On Fri, Mar 15, 2019 at 4:42 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com
> <mailto:adrian(dot)klaver(at)aklaver(dot)com>> wrote:
> OK, and thanks for the info. I've gleaned that rules are not
> "deprecated" in the sense that they are slated for removal, but they are
> rather discouraged. Since that's the case, wouldn't it make sense to
> warn users about this? That might keep them away from rules, and ease
> any eventual deprecation/transition issues you might have by lowering
> the number of "rules" in the wild.
Well then there is this section:
https://www.postgresql.org/docs/11/rules-views.html
So as was mentioned in thread I posted, until someone comes up with a
replacement they are not going away.
>
> In the section on "Rules vs. Triggers" (41.7), it doesn't even hint at
> this, and even says:
>
> /"For the things that can be implemented by both, which is best depends
> on the usage of the database."
> /
>
> There _is_ a nice CAUTION box in 41.4 ("Rules on Insert, Update and
> Delete"). I would suggest that something like that should go into Rules
> vs. Triggers, and then have a short caution box at the top of perhaps
> every Rule page (or at the very least for "CREATE RULE") that says
> something like "Rules are discouraged. You may be better off with
> Triggers instead. See <rules_v_triggers>."
>
> Just my two cents, but that might help more people be aware of the issue
> and avoid rules altogether.
I thought I remember there being something like in a older version of
the docs. I can't find it now, so it might be just my mind playing
tricks on me.
>
> Cheers,
> Ken
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Ron | 2019-03-16 01:02:21 | Re: Permission Read Only User |
Previous Message | Ken Tanzer | 2019-03-16 00:19:38 | Re: Conditional INSERT |