Re: bug report: slow getColumnTypeName

From: Luis Flores <luiscamposflores(at)gmail(dot)com>
To: Maciek Sakrejda <m(dot)sakrejda(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 16:16:42
Message-ID: CA+nXnG97xdBY5RwZ7Pjz3fVE-9rakFJkSyGMoQOJB0EbUQYKRw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

You're absolutely correct, I though the serial name was also reported
in psql, but no, only in pgadmin, so, like you said, in postgresql
there are only int4 and int8.

Which means we (or the driver maintainers, to be more precise) must
choose, postgresql complaint (int4) or jdbc complaint (serial)...

But changing this type of things is not nice for applications ...

Luis Flores

On Thu, Oct 11, 2012 at 4:45 PM, Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)com> wrote:
> 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.

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Thor Michael Støre 2012-10-11 17:25:48 ResultSetMetaData.isNullable(i) and outer joined columns
Previous Message pramodh reddy 2012-10-11 15:52:26 large object max size