Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 8136B9FBDB2 for ; Tue, 19 Jun 2007 08:22:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 36762-02-4 for ; Tue, 19 Jun 2007 08:22:22 -0300 (ADT) X-Greylist: delayed 00:18:00.396959 by SQLgrey-1.7.5 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 289709FBD9D for ; Tue, 19 Jun 2007 08:22:19 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from seriex.dnsystem.com (seriex.dnsystem.com [66.135.37.149]) by svr4.postgresql.org (Postfix) with ESMTP id AC6E55AF8A7 for ; Tue, 19 Jun 2007 11:04:17 +0000 (GMT) Received: from 201.red-217-125-48.staticip.rima-tde.net ([217.125.48.201] helo=[192.168.0.24]) by seriex.dnsystem.com with esmtpa (Exim 4.63) (envelope-from ) id 1I0bVO-0005R6-7O for pgsql-jdbc@postgresql.org; Tue, 19 Jun 2007 13:04:14 +0200 Message-ID: <4677B87B.2000108@empretal.com> Date: Tue, 19 Jun 2007 13:05:31 +0200 From: Javier Caballero User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Driver modified for JDeveloper+ADF communication Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - seriex.dnsystem.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - empretal.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200706/61 X-Sequence-Number: 17123 Hi. I'm doing a program with JDeveloper+ADF and Postgre and was having problems with the update sentence (created automatically by JDeveloper). After some research, found the problem in the SQL sentence. Postgre don't accept alias in a UPDATE query and JDeveloper sends it. I have modified the driver to eliminate the alias, here's a new method to include in AbstractJdbc2Statement.java: private String eliminaAlias(String sql) { String nuevaSQL= sql; StringTokenizer cadenaTokens=new StringTokenizer(sql); String vTokens[]= new String[cadenaTokens.countTokens()]; int j= 0; String temp; while(cadenaTokens.hasMoreTokens()) { temp= cadenaTokens.nextToken(); vTokens[j]= temp; j++; } // La sentencia tiene un alias, hay que eliminarlo if((vTokens[1].toLowerCase()).equals(vTokens[2].toLowerCase()) || (vTokens[1].toLowerCase()).equals("public."+vTokens[2].toLowerCase())) { nuevaSQL= ""; for(int i=0;i