Re: plpgsql function startup-time improvements

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: plpgsql function startup-time improvements
Date: 2017-12-28 15:12:59
Message-ID: 9cc4864a-a777-04ff-e8b4-5f60254906c5@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-12-28 15:15:58 Re: [HACKERS] taking stdbool.h into use
Previous Message Peter Eisentraut 2017-12-28 15:05:17 Re: Contributing with code