Skip site navigation (1) Skip section navigation (2)

Re: General Parser

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Ulrich Meis <kenobi(at)halifax(dot)rwth-aachen(dot)de>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: General Parser
Date: 2004-11-01 11:12:16
Message-ID: 41861A10.1000607@opencloud.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
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

In response to

Responses

pgsql-jdbc by date

Next:From: Ulrich MeisDate: 2004-11-01 14:39:24
Subject: Re: General Parser
Previous:From: Oliver JowettDate: 2004-11-01 11:06:25
Subject: Re: General Parser

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group