pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Serge Rielau <serge@rielau.com>
To: Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
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 10:09:37 -0700
Message-ID: <e85343e6-5ab5-447c-9995-5cce992fedf3@rielau.com> (raw)
In-Reply-To: <1f4c1a22-ecbe-811d-4695-ee4701b8f6c7@postgrespro.ru>
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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

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 [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.
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

view thread (107+ messages)  latest in thread

Message-ID: <e85343e6-5ab5-447c-9995-5cce992fedf3@rielau.com>
Permalink:  ../e85343e6-5ab5-447c-9995-5cce992fedf3@rielau.com/
Also on:    postgresql.org/message-id/e85343e6-5ab5-447c-9995-5cce992fedf3@rielau.com

 · 

reply

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: serge@rielau.com, k.knizhnik@postgrespro.ru, ddoole@salesforce.com
  Subject: Re: Cached plans and statement generalization
  In-Reply-To: <e85343e6-5ab5-447c-9995-5cce992fedf3@rielau.com>

* 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