Re: Auto-increment serial (Postgresql JDBC driver w/ - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Auto-increment serial (Postgresql JDBC driver w/
Date
Msg-id Pine.BSO.4.56.0409202046080.9396@leary.csoft.net
Whole thread Raw
In response to Auto-increment serial (Postgresql JDBC driver w/ OpenOffice.org ;) )  ("Jaroslaw J. Pyszny" <arghil@poczta.onet.pl>)
Responses Re: Auto-increment serial (Postgresql JDBC driver w/
Re: Auto-increment serial (Postgresql JDBC driver w/
List pgsql-jdbc

On Mon, 21 Sep 2004, Jaroslaw J. Pyszny wrote:

> Under OO 'serial' columns don't work, because OO doesn't see
> 'serial' as auto-increment type. I know it's pseuso-type, but
> we can detect it. What do you think, about add this feature
> to driver?
>

The basic idea looks good to me, but you've made a mistake in the
isAutoIncrement() method.  You are using the column number from the
ResultSet to look up the default when you need to actually use that
column's position in the table.  In fact it looks like the whole method
body should be moved into the Field class much like the isNullable method
does.  This also avoid the contrived hash key value.

Finally we prefer patches in context diff format (diff -c).

Kris Jurka

pgsql-jdbc by date:

Previous
From: Jeffrey Tenny
Date:
Subject: Re: "Idle in Transaction" revisited.
Next
From: "John R Pierce"
Date:
Subject: Re: "Idle in Transaction" revisited.