Skip site navigation (1) Skip section navigation (2)

Re: EXPLAIN, utility statement parameters, and recent plpgsql changes

From: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: EXPLAIN, utility statement parameters, and recent plpgsql changes
Date: 2010-01-14 19:26:51
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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?


In response to


pgsql-hackers by date

Next:From: Dimitri FontaineDate: 2010-01-14 19:36:07
Subject: Re: Streaming replication, retrying from archive
Previous:From: David FetterDate: 2010-01-14 18:55:16
Subject: Re: Miscellaneous changes to plperl [PATCH]

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group