Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TMaqt-00050U-HQ for pgsql-jdbc@postgresql.org; Fri, 12 Oct 2012 08:44:15 +0000 Received: from mail-ea0-f174.google.com ([209.85.215.174]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TMaqo-0000px-3W for pgsql-jdbc@postgresql.org; Fri, 12 Oct 2012 08:44:14 +0000 Received: by mail-ea0-f174.google.com with SMTP id c13so524754eaa.19 for ; Fri, 12 Oct 2012 01:44:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:x-mailer:from:subject:date :to; bh=d+ANHbd3lYD6Z8/270AIbr4HBwF7ZIbeOlcTIdUBVa4=; b=EW9s2yRxEtju7TvatM6EFHAaBgFSB8zSqIL1z/jCoDSKG9mTxEScsPEUan/em5+Mh5 grigAmwWRsJnQDGXUXpJpnrILTsBez21roWdqaj4BUorNTUvAL23TbXhFZAT4XeE4hro KAvgjtEq4cK6jkIXvnBwaDsqEhaztGB75JodnV/6JiMgFa7UZqOGprcpVHeE+f57ZQxi KtSdpd5neVSsLJdXTku7Jjpv+oymteJ6XBArLCwo2ABGKQIYh24RnJkjAGjwd1qoUc7C HxhhcC0qRU5sVpnI3vGTitmqiePTlQeBSYO6DP+FnzvTXg8iYEqzOHOXfyhgtFRWr/kM jtDg== Received: by 10.14.220.134 with SMTP id o6mr5734870eep.35.1350031448799; Fri, 12 Oct 2012 01:44:08 -0700 (PDT) Received: from [10.50.252.148] (62.169.86.131.rev.optimus.pt. [62.169.86.131]) by mx.google.com with ESMTPS id d44sm10562240eeo.10.2012.10.12.01.44.07 (version=SSLv3 cipher=OTHER); Fri, 12 Oct 2012 01:44:07 -0700 (PDT) References: <50745541.8060204@ttc-cmc.net> <50776FB4.5090701@ringerc.id.au> <5077C103.4040701@ringerc.id.au> Mime-Version: 1.0 (1.0) In-Reply-To: <5077C103.4040701@ringerc.id.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: Cc: Thomas Kellerer , "pgsql-jdbc@postgresql.org" X-Mailer: iPhone Mail (10A403) From: Luis Flores Subject: Re: bug report: slow getColumnTypeName Date: Fri, 12 Oct 2012 09:39:03 +0100 To: Craig Ringer X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201210/54 X-Sequence-Number: 23378 I agree, my only doubt is about the reasons behind the change, the driver wa= s reporting int4, int8, and then was changed, why? Luis Flores On 12/10/2012, at 08:04, Craig Ringer wrote: > On 10/12/2012 02:33 PM, Thomas Kellerer wrote: >=20 >> When looking at a CREATE TABLE statement in a SQL tool, users expect to >> see "serial" there if the table was created that way. >=20 > Applications can check the metadata and make any transformations they want= for display. The fact remains that the data type is "integer" or "bigintege= r". >=20 > JDBC isn't for the "end user", it's an API for developers, much like libpq= . >=20 > I maintain that presenting "serial" or "bigserial" as a *type* is just pla= in wrong. If nothing else: >=20 > regress=3D# create table blah ( id serial primary key ); > CREATE TABLE > regress=3D# 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 (... >=20 > Also: >=20 > regress=3D# SELECT '1'::serial; > ERROR: type "serial" does not exist > LINE 1: SELECT '1'::serial; >=20 > Seriously, reporting the type as "serial" is just plain wrong. >=20 > -- > Craig Ringer >=20 >=20 >=20 > --=20 > Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-jdbc