Re: Cached plans and statement generalization

From: Serge Rielau <serge(at)rielau(dot)com>
To: Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Doug Doole <ddoole(at)salesforce(dot)com>
Subject: Re: Cached plans and statement generalization
Date: 2017-04-25 20:40:10
Message-ID: C0064A85-7CE9-44E6-B14F-98E541B328FD@rielau.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> On Apr 25, 2017, at 1:37 PM, Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru> wrote:
>>
>> SELECT ‘hello’::CHAR(10) || ‘World’, 5 + 6;
>>
>> You can substitute ‘hello’, ‘World’, 5, and 6. But not 10.
>
> I am substituting only string literals. So the query above will be transformed to
>
> SELECT $1::CHAR(10) || $2, 5 + 6;
>
> What's wrong with it?

Oh, well that leaves a lot of opportunities on the table, doesn’t it?

Cheers
Serge

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Konstantin Knizhnik 2017-04-25 20:47:44 Re: Cached plans and statement generalization
Previous Message Konstantin Knizhnik 2017-04-25 20:37:37 Re: Cached plans and statement generalization