Re: Set search_path + server-prepared statements = cached plan must not change result type

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Set search_path + server-prepared statements = cached plan must not change result type
Date: 2016-01-28 02:42:23
Message-ID: CA+TgmobVma9x_viC8OYxcm67hVygh7HE5rDgWGQ5YLcW2EX96g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 25, 2016 at 2:11 PM, Vladimir Sitnikov
<sitnikov(dot)vladimir(at)gmail(dot)com> wrote:
> I want to treat 'prepare' operation as an optimization step, so it is functionally equivalent to sending a query text.
>
> In other words, I would like backend to track search_path and other parameters if necessary transparently‎, creating (caching) different execution plans if different plans are required.
> ‎
> Does that make sense?‎

Hmm, so in your example, you actually want replanning to be able to
change the cached plan's result type?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-01-28 02:48:56 Re: Combining Aggregates
Previous Message Robert Haas 2016-01-28 02:40:06 Re: [POC] FETCH limited by bytes.