Re: [HACKERS] generated columns - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: [HACKERS] generated columns
Date
Msg-id CAFj8pRBx8GFxWuZxyJ67Et3WcnXOYNJH-twEWN_Sw+joZN6_uw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] generated columns  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers


st 16. 1. 2019 v 9:26 odesílatel Peter Eisentraut <peter.eisentraut@2ndquadrant.com> napsal:
On 15/01/2019 08:18, Pavel Stehule wrote:
> 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;
>  ..

That kind of use is probably better addressed with a temporal facility.

yes. I am looking for this functionality in Postgres

Pavel


--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] REINDEX CONCURRENTLY 2.0
Next
From: Masahiko Sawada
Date:
Subject: Re: New vacuum option to do only freezing