Re: How to find if a column is a "serial" column?

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: How to find if a column is a "serial" column?
Дата
Msg-id Pine.LNX.4.33.0312210105590.20574-100000@leary.csoft.net
обсуждение исходный текст
Ответ на How to find if a column is a "serial" column?  (Dave Bartmess <dingodave@edingo.net>)
Ответы postgres 7.4.1 release  (Dave Cramer <pg@fastcrypt.com>)
Список pgsql-jdbc

On Sat, 20 Dec 2003, Dave Bartmess wrote:

> How do I determine if a column has been declared as a serial, since it
> only comes back in getColumns() as java.sql.Types.INTEGER in the
> resultset column "DATA_TYPE"?

Well, there is no value in java.sql.Types which represents the serial
data type.  We could possibly return "serial" as the TYPE_NAME column
instead of int, but this could cause problems for other people who expect
it to return int.  I would suggest examining COLUMN_DEF to see if it is
calling a sequence.  This is kind of hack, but so is the serial type.

Kris Jurka


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

Предыдущее
От: Dave Bartmess
Дата:
Сообщение: How to find if a column is a "serial" column?
Следующее
От: Dave Cramer
Дата:
Сообщение: postgres 7.4.1 release