From: Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
To: Serge Rielau <serge@rielau.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Cc: Doug Doole <ddoole@salesforce.com>
Subject: Re: Cached plans and statement generalization
Date: Tue, 25 Apr 2017 23:37:37 +0300
Message-ID: <58FFB391.5080101@postgrespro.ru> (raw)
In-Reply-To: <e85343e6-5ab5-447c-9995-5cce992fedf3@rielau.com>
References: <8e76d8fc-8b8c-14bd-d4d1-e9cf193a74f5@postgrespro.ru>
<20170424184353.u2krt2eiw2l6e2af@alap3.anarazel.de>
<f0bfcdd6-dba3-e9a8-2108-146e1f880839@postgrespro.ru>
<CBF37923-CDA5-48EF-9E9E-4A338D7988ED@rielau.com>
<1f4c1a22-ecbe-811d-4695-ee4701b8f6c7@postgrespro.ru>
<e85343e6-5ab5-447c-9995-5cce992fedf3@rielau.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 04/25/2017 08:09 PM, Serge Rielau wrote:
>
> On Tue, Apr 25, 2017 at 9:45 AM, Konstantin Knizhnik <k.knizhnik@postgrespro.ru> wrote:
>
> On 25.04.2017 19:12, Serge Rielau wrote:
>
>
> On Apr 25, 2017, at 8:11 AM, Konstantin Knizhnik <k.knizhnik@postgrespro.ru <mailto:k.knizhnik@postgrespro.ru>> wrote:
> Another problem is caused by using integer literals in context where parameters can not be used, for example "order by 1”.
>
> You will also need to deal with modifiers in types such as VARCHAR(10). Not sure if there are specific functions which can only deal with literals (?) as well.
>
> Sorry, I do not completely understand how presence of type modifiers can affect string literals used in query.
> Can you provide me some example?
>
> 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?
>
> Also some OLAP syntax like “rows preceding”
>
> It pretty much boils down to whether you can do some shallow parsing rather than expending the effort to build the parse tree.
>
> Cheers
> Serge
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: k.knizhnik@postgrespro.ru, serge@rielau.com, ddoole@salesforce.com
Subject: Re: Cached plans and statement generalization
In-Reply-To: <58FFB391.5080101@postgrespro.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox