From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Sergei Kornilov <sk(at)zsrv(dot)org>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Jaime Casanova <jaime(dot)casanova(at)2ndquadrant(dot)com> |
Subject: | Re: [HACKERS] generated columns |
Date: | 2019-01-15 07:18:58 |
Message-ID: | CAFj8pRAuSk=C5XQG+BwCjFZGd69twFQG_v_jNgnN+Qcr6ZEetA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
út 15. 1. 2019 v 8:14 odesílatel Michael Paquier <michael(at)paquier(dot)xyz>
napsal:
> On Sun, Jan 13, 2019 at 03:31:23PM +0100, Pavel Stehule wrote:
> > ne 13. 1. 2019 v 10:43 odesílatel Peter Eisentraut <
> > peter(dot)eisentraut(at)2ndquadrant(dot)com> napsal:
> >> See here:
> >>
> >>
> https://www.postgresql.org/message-id/b5c27634-1d44-feba-7494-ce5a31f914ca@2ndquadrant.com
> >
> > I understand - it is logical. But it is sad, so this feature is not
> > complete. The benefit is not too big - against functional indexes or
> views.
> > But it can be first step.
>
> I wouldn't say that. Volatibility restrictions based on immutable
> functions apply to many concepts similar like expression pushdowns to
> make for deterministic results. The SQL spec takes things on the safe
> side.
>
I would to have a mechanism for safe replacement of triggers of type
if TG_TYPE = 'INSERT' THEN
NEW.inserted := CURRENT_TIMESTAMP;
ELSE IF TG_TYPE = 'UPDATE' THEN
NEW.updated := CURRENT_TIMESTAMP;
..
But I understand, so current SQL spec design is safe.
Regards
Pavel
>
From | Date | Subject | |
---|---|---|---|
Next Message | Kuroda, Hayato | 2019-01-15 08:00:24 | RE: Log a sample of transactions |
Previous Message | Michael Paquier | 2019-01-15 07:13:59 | Re: [HACKERS] generated columns |