wrong parsing of "select version();"

From: Eberhard Schulte <esc(at)pixelboxx(dot)de>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: wrong parsing of "select version();"
Date: 2007-01-26 08:20:24
Message-ID: 45B9B9C8.2030600@pixelboxx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hello,

if I excute "select version();", then I recieve: "7.3.4-RH".
In the JDBC-Driver code however two of token are expected. A
NoSuchElementException could be thrown.
I think, there is a bug!

postgresql-jdbc-8.2-504.src.tar.gz:
ConnectionFactoryImpl.java line 426:

StringTokenizer versionParts = new StringTokenizer(rawDbVersion);
versionParts.nextToken(); /* "PostgreSQL" */
String dbVersion = versionParts.nextToken(); /* "X.Y.Z" */

Regards,

Eberhard Schulte

------------------------------------------------
Eberhard Schulte
Senior Software Engineer
Pixelboxx GmbH esc(at)pixelboxx(dot)de
Ostenhellweg 56-58 http://www.pixelboxx.de/
44135 Dortmund (02 31) 5 34 63-207
------------------------------------------------

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Eberhard Schulte 2007-01-26 08:31:22 Re: wrong parsing of "select version();"
Previous Message Ken Johanson 2007-01-26 07:12:22 Re: Synthesize support for Statement.getGeneratedKeys()?