Re: Propagate sanity checks of ProcessUtility() to standard_ProcessUtility()? - Mailing list pgsql-hackers

From jian he
Subject Re: Propagate sanity checks of ProcessUtility() to standard_ProcessUtility()?
Date
Msg-id CACJufxENjwgKUuv_Na72W5OmYEq1ycZ5s7Rd8kXPk-XDK3sh6g@mail.gmail.com
Whole thread Raw
In response to Propagate sanity checks of ProcessUtility() to standard_ProcessUtility()?  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Propagate sanity checks of ProcessUtility() to standard_ProcessUtility()?
List pgsql-hackers
On Thu, Feb 29, 2024 at 3:21 PM Michael Paquier <michael@paquier.xyz> wrote:
>
> Hi all,
>
> It's been brought to me that an extension may finish by breaking the
> assumptions ProcessUtility() relies on when calling
> standard_ProcessUtility(), causing breakages when passing down data to
> cascading utility hooks.
>
> Isn't the state of the arguments given something we should check not
> only in the main entry point ProcessUtility() but also in
> standard_ProcessUtility(), to prevent issues if an extension
> incorrectly manipulates the arguments it needs to pass down to other
> modules that use the utility hook, like using a NULL query string?
>
> See the attached for the idea.

why not just shovel these to standard_ProcessUtility.
so ProcessUtility will looking consistent with (in format)
 * ExecutorStart()
 * ExecutorRun()
 * ExecutorFinish()
 * ExecutorEnd()



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Propagate sanity checks of ProcessUtility() to standard_ProcessUtility()?
Next
From: Michael Banck
Date:
Subject: Remove AIX Support (was: Re: Relation bulk write facility)