Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TONE5-0000L5-Om for pgsql-jdbc@postgresql.org; Wed, 17 Oct 2012 06:35:33 +0000 Received: from mbx.knossos.net.nz ([202.160.48.10]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TONDx-0005oj-CA for pgsql-jdbc@postgresql.org; Wed, 17 Oct 2012 06:35:32 +0000 Received: from [10.1.1.3] (60-234-150-59.bitstream.orcon.net.nz [60.234.150.59]) (authenticated bits=0) by mbx.knossos.net.nz (8.14.4/8.14.4) with ESMTP id q9H6YtZC014234 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 17 Oct 2012 19:35:03 +1300 Message-ID: <507E518C.9080101@archidevsys.co.nz> Date: Wed, 17 Oct 2012 19:34:52 +1300 From: Gavin Flower Organization: ArchiDevSys User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: Craig Ringer CC: Dave Cramer , Luis Flores , Thomas Kellerer , "pgsql-jdbc@postgresql.org" Subject: Re: bug report: slow getColumnTypeName References: <50745541.8060204@ttc-cmc.net> <50776FB4.5090701@ringerc.id.au> <5077C103.4040701@ringerc.id.au> <5077EBAD.5060708@ringerc.id.au> <507E3A78.5040707@ringerc.id.au> In-Reply-To: <507E3A78.5040707@ringerc.id.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201210/67 X-Sequence-Number: 23391 On 17/10/12 17:56, Craig Ringer wrote: > On 10/17/2012 07:28 AM, Dave Cramer wrote: >> So what is the consensus on this. >> >> I would lean towards removing serial types here > > I certainly want to, as I think the status quo is not only inefficient > and incorrect but it fails to even function as designed (incorrectly > calling 'integer' columns generated by a sequence 'serial' no matter > what the sequence is) and cannot easily be fixed. > > The questions that must still be answered are: > > - How do we tell developers about the change? > > - Is a compatibility flag required? > > - What might it break? Do we need to test popular ORM systems or let > their developers know? > > - What does the metadata spec actually require us to supply? > > > The 9.2 driver has been pushed and it's a backwards-incompatible > change, so it's probably a change that's only suitable for 9.3/master. > I'm inclined to just make the change in master, push a beta driver to > the website, and see it reports come in. I can test Hibernate and > EclipseLink out, but I'm pretty sure they won't care. > > > BTW, I'm quite surprised that PostgreSQL doesn't expose information > about column value generation in INFORMATION_SCHEMA.COLUMNS at the > moment; the "is_identity" column is always "NO" and "is_generated" is > always "NEVER". `pg_attribute` doesn't seem to convey it either. > Shouldn't we be able to ask PostgreSQL for this information? > > I'll have a look and see how the driver currently reports whether > fields are generated, are identity fields, etc. > > Looking at the number of issue reports that focus on metadata, I > suspect that's a real weak point of the current driver and really > needs a review. Yay. Something for all that abundant spare time. > > -- > Craig Ringer > > Come on! You were getting bored out of your tiny little mind!! Cheers, Gavin