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

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: Auto-increment serial (Postgresql JDBC driver w/
Дата
Msg-id 1095807031.1556.129.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: Auto-increment serial (Postgresql JDBC driver w/  (Dave Cramer <pg@fastcrypt.com>)
Ответы Re: Auto-increment serial (Postgresql JDBC driver w/
Список pgsql-jdbc
Sorry, missed one more where clause.

select column_default from information_schema.columns where table_name =
'xyz' and column_name = 'id';

This assumes a table defined like create table xyz (id serial);

Dave
On Tue, 2004-09-21 at 16:31, Dave Cramer wrote:
> This is probably a much more portable way to get the same information.
>
>  select column_default from information_schema.columns where table_name
> = 'xyz';
>
> Dave
> On Tue, 2004-09-21 at 15:25, Jaroslaw J. Pyszny wrote:
> > W liście z wto, 21-09-2004, godz. 03:50, Kris Jurka pisze:
> > > On Mon, 21 Sep 2004, Jaroslaw J. Pyszny wrote:
> > >
> >
> > > 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).
> > Thanks :)
> > I'll try fix it.
> >
> > Jarek
--
Dave Cramer
519 939 0336
ICQ # 14675561
www.postgresintl.com


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: Auto-increment serial (Postgresql JDBC driver w/
Следующее
От: "Qi, Xlaoyan"
Дата:
Сообщение: Remote access with JDBC