Re: Transient plans versus the SPI API - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: Transient plans versus the SPI API
Date
Msg-id m262m3de7m.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Re: Transient plans versus the SPI API  (Hannu Krosing <hannu@krosing.net>)
List pgsql-hackers
Hannu Krosing <hannu@krosing.net> writes:
>> Hm, you mean reverse-engineering the parameterization of the query?
>
> Yes, basically re-generate the query after (or while) parsing, replacing
> constants and arguments with another set of generated arguments and
> printing the list of these arguments at the end. It may be easiest to do
> This in parallel with parsing.
>
>> Interesting thought, but I really don't see a way to make it practical.
>
> Another place where this could be really useful is logging & monitoring

Another big use case is full support for materialized views: we could
then optimize a query to automatically use a matview even when written
against the “usual” schema.  Now matviews are another kind of indexes.

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: small issue with host names in hba
Next
From: Jeff Davis
Date:
Subject: Re: Extra check in 9.0 exclusion constraint unintended consequences