| From: | Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)com> |
|---|---|
| To: | Luis Flores <luiscamposflores(at)gmail(dot)com> |
| Cc: | David Johnston <polobo(at)yahoo(dot)com>, Eyal Wilde <eyal(dot)wilde(at)gmail(dot)com>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>, dmp <danap(at)ttc-cmc(dot)net> |
| Subject: | Re: bug report: slow getColumnTypeName |
| Date: | 2012-10-11 15:45:04 |
| Message-ID: | CAOtHd0BcUxUOwVabZ7ZomJrWNoj=G9uXrCSCXq0qAOA_F6KXaA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
On Thu, Oct 11, 2012 at 7:07 AM, Luis Flores <luiscamposflores(at)gmail(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | pramodh reddy | 2012-10-11 15:52:26 | large object max size |
| Previous Message | Luis Flores | 2012-10-11 14:07:09 | Re: bug report: slow getColumnTypeName |