Skip site navigation (1) Skip section navigation (2)

Re: Auto-increment serial (Postgresql JDBC driver w/

From: Kris Jurka <books(at)ejurka(dot)com>
To: "Jaroslaw J(dot) Pyszny" <arghil(at)poczta(dot)onet(dot)pl>
Cc: pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Auto-increment serial (Postgresql JDBC driver w/
Date: 2004-09-21 01:50:00
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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

In response to


pgsql-jdbc by date

Next:From: John R PierceDate: 2004-09-21 04:02:12
Subject: Re: "Idle in Transaction" revisited.
Previous:From: Jeffrey TennyDate: 2004-09-21 01:21:49
Subject: Re: "Idle in Transaction" revisited.

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group