Re: Restore relhaspkey in PostgreSQL Version 11 Beta

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Melvin Davidson <melvin6925(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Restore relhaspkey in PostgreSQL Version 11 Beta
Date: 2018-07-30 23:13:59
Message-ID: 9685e992-5631-305a-f84b-98db6efddb7f@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 07/30/2018 04:11 PM, Melvin Davidson wrote:
>
>
> On Mon, Jul 30, 2018 at 6:21 PM, Andres Freund <andres(at)anarazel(dot)de
> <mailto:andres(at)anarazel(dot)de>> wrote:
>
> Hi,
>
> On 2018-07-30 17:21:25 -0400, Melvin Davidson wrote:
> > * >it has never been the case that relhaspkey meant that the table
> > *currently* has a primary key. *
>
> > *Hmmm, I guess it's a lot harder to fix "squishy semantics"from
>     "True
> > if the table has (or once had) a primary key"  to    "True if the table has
> > a primary key after vacuum"rather than just dropping a column that has
> > existed from version 7.2.So <http://7.2.So> now I guess the
> policy is break code instead of
> > fix documention.That meakes sense...NOT!*
>
> A large portion of the system catalogs (i.e. objects within
> pg_catalog.*) are essentially internal implementation details and we'll
> change them if it makes our live easier. If you want stability use
> information_schema which we'll try very hard to not ever break.  Keeping
> random atavistic things around, would slow us down, which will be a
> price everybody is paying.
>
> Greetings,
>
> Andres Freund
>
>
> *> If you want stability use information_schema which we'll try very
> hard to not ever break.
> *
> *Of course. Would you be so kind as to point out where in the
> information_schema it
> *
> *indicates if a table has a primary key or not. Oh wait, now I
> remember...no place.*

https://www.postgresql.org/docs/10/static/infoschema-table-constraints.html

"constraint_type character_data Type of the constraint: CHECK, FOREIGN
KEY, PRIMARY KEY, or UNIQUE"

> *
> *
> *>Keeping random atavistic things around, would slow us down, which will
> be a
> >price everybody is paying.
> *
> *Random atavistic things? I hardly think relhaspkey is random. It's been
> there since version 7.2.*
> *Exactly how does keeping it around slow you/us down?
> *
>
>
> --
> *Melvin Davidson**
> Maj. Database & Exploration Specialist**
> Universe Exploration Command – UXC***
> Employment by invitation only!

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andres Freund 2018-07-30 23:24:48 Re: Restore relhaspkey in PostgreSQL Version 11 Beta
Previous Message Melvin Davidson 2018-07-30 23:11:34 Re: Restore relhaspkey in PostgreSQL Version 11 Beta