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

From Peter Eisentraut
Subject Re: [HACKERS] generated columns
Date
Msg-id 78225f31-09ed-a353-edd2-d01ae100e3d6@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] generated columns  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: [HACKERS] generated columns  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
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.

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


pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: using expression syntax for partition bounds
Next
From: "Tsunakawa, Takayuki"
Date:
Subject: RE: Libpq support to connect to standby server as priority