Re: add queryEnv to ExplainOneQuery_hook

From: Tatsuro Yamada <yamada(dot)tatsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: add queryEnv to ExplainOneQuery_hook
Date: 2018-01-12 01:43:40
Message-ID: 9612a8bd-3adc-51d3-cb35-7df909a05fc3@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2018/01/11 21:46, Michael Paquier wrote:
>> I'm surprised we haven't heard any complaints sooner if there are
>> advisors using that hook[1] and expecting to be able to forward to
>> ExplainOnePlan(), but I suppose it would nearly always works to call
>> ExplainOnePlan() with NULL as queryEnv. It'd currently only be
>> non-NULL for trigger functions running SQL to access transition
>> tables, which is a bit obscure: you'd need to run EXPLAIN inside a
>> suitable trigger function (though in future there might be more ways
>> to create named tuplestore relations).
>
> It seems to me that QueryEnv should be pushed to the hook, but only on
> HEAD. You surely don't want to break people's extensions after a minor
> upgrade.

Thanks guys! :)

I also surprised that there is no complaint from extension creators.
I suppose that if possible, it would be better to create a unit test
for the hook function to avoid the same bug because there is no contrib
module using ExplainOneQuery_hook in contrib directory.
(It might unnecessary thing, maybe.)

Regards,
Tatsuro Yamada

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuro Yamada 2018-01-12 01:45:48 Re: add queryEnv to ExplainOneQuery_hook
Previous Message Thomas Munro 2018-01-12 01:41:06 Re: [HACKERS] postgres_fdw bug in 9.6