Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: I found a bug in the jdbc driver: msg#00086

db.postgresql.jdbc

Subject: Re: I found a bug in the jdbc driver

Good catch, go right ahead and fix it, please submit the fix as a
context diff

Thanks,

Dave
On Thu, 2003-05-22 at 09:57, =?iso-8859-1?Q?innuendo-nh@xxxxxxxxx?=
wrote:
> I have just found a bug in the latest jdbc driver.
>
> The error is in the class org.postgresql.jdbc2.AbstractJdbc2ResultSet
>
> the method parseQuery() has a bug:
>
> if you give as sql query something like "SELECT * FROM tablename;", that is a
> valid sql statement, and you try to use a resultset update method (like
> updateInt()), you receive an SQLException saying: No Primary Keys. this is
> because the method parseQuery() make a too simplified use of the
> StringTokenizer, so the variable tableName is set at something like this:
> "tablename;". So when the isUpdateable() method request for the primary keys
> of
> the table 'tablename;', postgres answers there are no rows (it can't fond any
> primary key for the table because it doesn't exists). The problem can be
> resolved writing the sql statement very carefully: you must insert blanks
> between any part of the sql statement (operators, keywords, ecc.). In my
> example
> the solution is to insert a blank before the semicolon ("SELECT * FROM
> tablename
> ;").
>
> I think i can resolve the problem, modifying the driver, but i wuold be glad
> to
> know if someone else is already working at it now.
>
> I hope this can be useful.
>
> Inny.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
>
--
Dave Cramer <Dave@xxxxxxxxxxxxxxxxxxxx>


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@xxxxxxxxxxxxxx)



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe