Re: plpgsql plugin - stmt_beg/end is not called for top level block of statements

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: plpgsql plugin - stmt_beg/end is not called for top level block of statements
Date: 2018-12-28 07:50:11
Message-ID: 20181228075011.GA1457@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 28, 2018 at 07:57:45AM +0100, Pavel Stehule wrote:
> There is only one difference - the plugin routine stmt_begin and stmt_end
> is called for line 3. Nothing less, nothing more.

Thanks for the detailed explanation! With your simple example it is
easy enough to see the difference, and indeed the callback stack is
more consistent the way you propose.

> Internal evaluation of plpgsql code is same - the change is only for plugin
> code - one more stmt_beg and stmt_end call - as expected and wanted.

Okay, that makes sense, now I got your point. Perhaps somebody else
has an opinion to offer or has an objection with the proposed change?
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mitar 2018-12-28 07:51:31 Re: Feature: triggers on materialized views
Previous Message Mitar 2018-12-28 07:48:10 Re: Feature: temporary materialized views