Re: bug report: slow getColumnTypeName - Mailing list pgsql-jdbc

From Maciek Sakrejda
Subject Re: bug report: slow getColumnTypeName
Date
Msg-id CAOtHd0BcUxUOwVabZ7ZomJrWNoj=G9uXrCSCXq0qAOA_F6KXaA@mail.gmail.com
Whole thread Raw
In response to Re: bug report: slow getColumnTypeName  (Luis Flores <luiscamposflores@gmail.com>)
Responses Re: bug report: slow getColumnTypeName
List pgsql-jdbc
On Thu, Oct 11, 2012 at 7:07 AM, Luis Flores <luiscamposflores@gmail.com> wrote:
> If you use a column with a default value from a sequence, the column
> type name doesn't change. If the column is int AND is generated from a
> sequence called <TABLE>_<COLUMN>_seq, then in postgresql (you can
> check in pgadmin) the column type name name changes from integer to
> serial. We may or may not agree with this, but it's the way postgresql
> works, so, the jdbc driver correctness and naming should be in line
> with the postgresql server naming (mapping to jdbc type naming).

For what it's worth, based on pg_attribute, this seems to be a
pgAdmin-ism rather than the way Postgres works. The column type as
reported by the catalogs is "integer" whether you create a serial-type
column or an integer column with a default from your own sequence.


pgsql-jdbc by date:

Previous
From: Luis Flores
Date:
Subject: Re: bug report: slow getColumnTypeName
Next
From: Luis Flores
Date:
Subject: Re: bug report: slow getColumnTypeName