Re: EXPLAIN, utility statement parameters, and recent plpgsql changes - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: EXPLAIN, utility statement parameters, and recent plpgsql changes
Date
Msg-id m28wc01o90.fsf@hi-media.com
Whole thread Raw
In response to EXPLAIN, utility statement parameters, and recent plpgsql changes  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: EXPLAIN, utility statement parameters, and recent plpgsql changes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:
> This works well enough for regular DML statements, but it falls down for
> EXPLAIN which is a utility statement, because *parse analysis of utility
> statements doesn't do anything*.  EXPLAIN actually does the parse
> analysis of its contained statement at the beginning of execution.
> And that is too late, in the scenario Pavel exhibited.  Why is it too
> late?  Because SPI_cursor_open_internal() intentionally "freezes" the
> ParamListInfo struct after doing initial parsing: what it copies into
> the cursor portal is just a static list of data values without the
> parser hooks (see copyParamList).

Would it make any sense for this function to get to call the hook in the
case a utility statement is being processed?

Regards,
-- 
dim


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: Miscellaneous changes to plperl [PATCH]
Next
From: Dimitri Fontaine
Date:
Subject: Re: Streaming replication, retrying from archive