Re: bug report: slow getColumnTypeName

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
Cc: Thomas Kellerer <spam_eater(at)gmx(dot)net>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: bug report: slow getColumnTypeName
Date: 2012-10-12 08:50:34
Message-ID: CADK3HHJSBhS=GOFpF5Ms16hD_yV-4wBMDJ7ds6hGeBd5bahqvw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

I would have to agree with Craig's assessment here. serial and
bigserial are pseudotypes.

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

On Fri, Oct 12, 2012 at 3:04 AM, Craig Ringer <ringerc(at)ringerc(dot)id(dot)au> wrote:
> On 10/12/2012 02:33 PM, Thomas Kellerer wrote:
>
>> When looking at a CREATE TABLE statement in a SQL tool, users expect to
>> see "serial" there if the table was created that way.
>
>
> Applications can check the metadata and make any transformations they want
> for display. The fact remains that the data type is "integer" or
> "biginteger".
>
> JDBC isn't for the "end user", it's an API for developers, much like libpq.
>
> I maintain that presenting "serial" or "bigserial" as a *type* is just plain
> wrong. If nothing else:
>
> regress=# create table blah ( id serial primary key );
> CREATE TABLE
> regress=# PREPARE insert_blah(serial) AS INSERT INTO blah(id)
> regress-# VALUES ($1);
> ERROR: type "serial" does not exist
> LINE 1: PREPARE insert_blah(serial) AS INSERT INTO blah(id) VALUES (...
>
> Also:
>
> regress=# SELECT '1'::serial;
> ERROR: type "serial" does not exist
> LINE 1: SELECT '1'::serial;
>
> Seriously, reporting the type as "serial" is just plain wrong.
>
> --
> Craig Ringer
>
>
>
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2012-10-12 08:51:17 Re: ResultSetMetaData.isNullable(i) and outer joined columns
Previous Message Luis Flores 2012-10-12 08:39:03 Re: bug report: slow getColumnTypeName