pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <davec@fastcrypt.com>
To: Randall Smith <randall@tnr.cc>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: query manipulation
Date: Wed, 21 Mar 2007 14:24:15 -0400
Message-ID: <A2FDFFC1-EA76-44A0-9835-1A5DA553FECC@fastcrypt.com> (raw)
In-Reply-To: <etrq19$k2n$1@sea.gmane.org>
References: <etmr99$4og$1@sea.gmane.org>
	<etrq19$k2n$1@sea.gmane.org>

Randall,

It would work, but it appears the utility here is to make the  
differences between JDBC versions transparent.

Dave
On 21-Mar-07, at 1:29 PM, Randall Smith wrote:

> Would this be a good tool to use here or would it create  
> unnecessary work?
>
> http://jakarta.apache.org/commons/dbutils/apidocs/org/apache/ 
> commons/dbutils/ProxyFactory.html
>
> public java.sql.PreparedStatement createPreparedStatement 
> (java.lang.reflect.InvocationHandler handler)
>
> Randall
>
>
> Randall Smith wrote:
>> I'm trying to find a way to manipulate some poorly written queries  
>> in which I don't have access to the application source.  I can't  
>> do it at the Postgresql server, so I'm thinking of attacking it at  
>> the jdbc driver.
>> I was thinking of a wrapper that would look at and alter the SQL  
>> before it went to the server.  Anyone know of something like this?  
>> Specifically, I'm trying to drop "FOR UPDATE column name" off of  
>> some queries.  They were written for Oracle, but Postgresql uses  
>> "FOR UPDATE table name".  I'm not a Java programmer, but I won't  
>> let that stop me if it is required.
>> Randall
>> ---------------------------(end of  
>> broadcast)---------------------------
>> TIP 7: You can help support the PostgreSQL project by donating at
>>                http://www.postgresql.org/about/donate
>
>
> ---------------------------(end of  
> broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>       choose an index scan if your joining column's datatypes do not
>       match
>




view thread (12+ messages)  latest in thread

Message-ID: <A2FDFFC1-EA76-44A0-9835-1A5DA553FECC@fastcrypt.com>
Permalink:  ../A2FDFFC1-EA76-44A0-9835-1A5DA553FECC@fastcrypt.com/
Also on:    postgresql.org/message-id/A2FDFFC1-EA76-44A0-9835-1A5DA553FECC@fastcrypt.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: davec@fastcrypt.com, randall@tnr.cc
  Subject: Re: query manipulation
  In-Reply-To: <A2FDFFC1-EA76-44A0-9835-1A5DA553FECC@fastcrypt.com>
  References: <etmr99$4og$1@sea.gmane.org> <etrq19$k2n$1@sea.gmane.org> <A2FDFFC1-EA76-44A0-9835-1A5DA553FECC@fastcrypt.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