Primary key error in INFORMATION_SCHEMA views

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: SQLpro <sqlpro(at)sqlspot(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Primary key error in INFORMATION_SCHEMA views
Date: 2018-05-24 12:28:03
Message-ID: CAKFQuwYPfj0L34wmp+z=H=pvWT1wa155wurh30vfVeHN-A=JNg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thursday, May 24, 2018, SQLpro <sqlpro(at)sqlspot(dot)com> wrote:

> Hi Tom,
>
> For a DBMS which loudly proclaims to be the most respectful of the SQL
> standard, not being able to use the INFORMATION_SCHEMA views because of
> such
> an error seems to me to go against its philosophy.
>
> Can not you change that by adding a configuration parameter, for a future
> version, that would allow you to apply these views more strictly?
>
> More pragmatically, what good can these views serve if we can not use them
> properly without bug? Better to remove them if you choose not to fix this
> bug …
>

Views don't have primary keys, they just report what is already stored. If
the database is standard conforming the view works perfectly. It also works
just fine if you accept that table name is part of the uniqueness so it
does provide useful and accurate data even though we don't conform to the
standard in this way. And breaking working applications to meet standard
conformance here is a losing cause.

Even with an option it would default to false and nearly everyone would
leave it that way. Those that would change it to true can easily write a
validation script of their own to check for duplicates that need fixing.

For better and worse this is what we have. Standard conformance is
respected but we are not going to cut off our own for just to meet a
marginal requirement that we don't actual prevent people from choosing to
adhere to themselves.

You haven't actually described the problem you are running into so further
insights that could alleviate your confusion are not possible.

David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Huong Dangminh 2018-05-25 02:00:04 RE: PostgreSQL 2018-05-10 Security Update Release
Previous Message SQLpro 2018-05-24 08:01:09 Re: Primary key error in INFORMATION_SCHEMA views