Re: plpgsql function startup-time improvements - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: plpgsql function startup-time improvements
Date
Msg-id 9cc4864a-a777-04ff-e8b4-5f60254906c5@2ndquadrant.com
Whole thread Raw
In response to plpgsql function startup-time improvements  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 12/27/17 15:38, Tom Lane wrote:
> It seems possible that the "promise" technique could be useful for
> other plpgsql special variables in future.  I thought briefly about
> applying it to triggers' NEW and OLD arguments, but desisted because
> (a) it's only a win if triggers will commonly not touch the variable,
> which seems unlikely to be true for NEW/OLD; and (b) it would have
> required infrastructure for attaching a promise to a DTYPE_REC
> variable, which was more pain than I wanted.  But I wonder if it'd
> be useful for, say, the special variables that exception blocks create.

This might be useful for instantiating virtual generated column values
in AFTER triggers on demand.  Although this would require promises on
record *fields*.  Anyway, it's useful infrastructure, and could have
more uses.

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


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Contributing with code
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] taking stdbool.h into use