On Tue, Apr 9, 2013 at 10:25 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> The materialized views patch adjusted ExplainOneQuery to take an
>> additional DestReceiver argument, but failed to add a matching
>> argument to the definition of ExplainOneQuery_hook. This makes the
>> hook unusable. The idea of this hook is that your hook function will
>> do something before and/or after calling pg_plan_query and
>> ExplainOnePlan. But this no longer works, because ExplainOnePlan
>> needs the DestReceiver, which hasn't been exposed to the hook. :-(
>
> TBH I'd like to revert all of that anyway; it seemed to me to be
> basically gratuitous breakage of an API used by plugins. I've not
> had time to look at whether there was an actual reason for it and
> if so how we might solve that differently.
Oops. I just pushed a fix for the situation as it stands, but it's
only 2 lines, so it shouldn't be too much trouble to revert it if we
decide on a different approach. I do agree it would be nice not to
need to change the API there.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company