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

From Dave Cramer
Subject Re: Auto-increment serial (Postgresql JDBC driver w/
Date
Msg-id 1095769996.1550.45.camel@localhost.localdomain
Whole thread Raw
In response to Re: Auto-increment serial (Postgresql JDBC driver w/  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
Can you pull the sql string out into a final static ? It's never going
to change. Also is there a way to do this using the information schema ?

Dave
On Mon, 2004-09-20 at 21:50, Kris Jurka wrote:
> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
--
Dave Cramer
519 939 0336
ICQ # 14675561
www.postgresintl.com


pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: raising the default prepareTheshold
Next
From: Gaetano Mendola
Date:
Subject: Re: "Idle in Transaction" revisited.