út 15. 1. 2019 v 8:14 odesílatel Michael Paquier <mich...@paquier.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.eisentr...@2ndquadrant.com> napsal: > >> See here: > >> > >> > https://www.postgresql.org/message-id/b5c27634-1d44-feba-7494-ce5a31f91...@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 >