plpgsql plugin - stmt_beg/end is not called for top level block of statements - Mailing list pgsql-hackers

From Pavel Stehule
Subject plpgsql plugin - stmt_beg/end is not called for top level block of statements
Date
Msg-id CAFj8pRArEANsaUjo5in9_iQt0vKf9ecwDAmsdN_EBwL13ps12A@mail.gmail.com
Whole thread Raw
Responses Re: plpgsql plugin - stmt_beg/end is not called for top level blockof statements  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
Hi

I am playing with plpgsql profiling and and plpgsql plugin API. I found so callback stmt_beg and stmt_end was not called for top statement due direct call exec_stmt_block function.

<-->estate.err_text = NULL;
<-->estate.err_stmt = (PLpgSQL_stmt *) (func->action);
<-->rc = exec_stmt_block(&estate, func->action);
<-->if (rc != PLPGSQL_RC_RETURN)
<-->{
<--><-->estate.err_stmt = NULL;
<--><-->estate.err_text = NULL;

Isn't better to call exec_stmt there? Then plpgsql plugin function will be called really for every plpgsql statement.

Regards

Pavel

pgsql-hackers by date:

Previous
From: Michael Banck
Date:
Subject: Re: pgsql: Add TAP tests for pg_verify_checksums
Next
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] generated columns