pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Ulrich Meis <kenobi@halifax.rwth-aachen.de>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: General Parser
Date: Tue, 02 Nov 2004 00:12:16 +1300
Message-ID: <41861A10.1000607@opencloud.com> (raw)
In-Reply-To: <200411010341.28499.kenobi@halifax.rwth-aachen.de>
References: <200411010341.28499.kenobi@halifax.rwth-aachen.de>

Ulrich Meis wrote:

> Attached you'll find a QueryParser class I've written that has all the 
> functionality that is implemented in the above methods and handles dollar 
> quoting. It parses the query in one run, so I believe it's pretty fast.

> The class still needs extensive testing but I wanted to make sure that I'm 
> doing the right thing first...so what are your thoughts?

I think it's a good idea to unify all the parsing that needs to be done, 
if only because it reduces code duplication.

That said, this still needs some work as the various different callers 
need different parsing done. For example, we only care about splitting 
queries into multiple statements when using the V3 protocol, we only 
care about ? placeholders when parsing a query supplied via 
prepareStatement, the { call } syntax only makes sense for 
CallableStatements, and there's no need to disassemble the SELECT etc if 
the application never uses an updatable resultset.

I'm not sure how easy it will be to have a single flexible parser and 
still have low overhead for the cases where we don't want to completely 
disassemble the query.

-O



view thread (6+ messages)  latest in thread

Message-ID: <41861A10.1000607@opencloud.com>
Permalink:  ../41861A10.1000607@opencloud.com/
Also on:    postgresql.org/message-id/41861A10.1000607@opencloud.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, kenobi@halifax.rwth-aachen.de
  Subject: Re: General Parser
  In-Reply-To: <41861A10.1000607@opencloud.com>
  References: <200411010341.28499.kenobi@halifax.rwth-aachen.de> <41861A10.1000607@opencloud.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