Re: [HACKERS] Re: Privileges for INFORMATION_SCHEMA.SCHEMATA (was Re: Small clarification in "34.41. schemata")

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Casey Allen Shobe <casey(at)shobe(dot)info>
Cc: Ian Lawrence Barwick <barwick(at)gmail(dot)com>, pgsql-docs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: [HACKERS] Re: Privileges for INFORMATION_SCHEMA.SCHEMATA (was Re: Small clarification in "34.41. schemata")
Date: 2013-01-14 18:53:39
Message-ID: 25791.1358189619@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

Casey Allen Shobe <casey(at)shobe(dot)info> writes:
> On Wed, Jan 9, 2013 at 8:56 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> However, it seems to me that this behavior is actually wrong for our
>> purposes, as it represents a too-literal reading of the spec. The SQL
>> standard has no concept of privileges on schemas, only ownership.
>> We do have privileges on schemas, so it seems to me that the consistent
>> thing would be for this view to show any schema that you either own or
>> have some privilege on.

> IMHO, schemata should follow the standard as it does today. Other
> platforms have privileges on schemas as well, and this sort of thing seems
> to fall into the same bucket as other platform compatibilities outside the
> scope of what the standard thinks about, which means you use pg_catalog to
> access that information rather than information_schema, which should be
> expected to work consistently on all platforms that implement it.

Meh. To me, standards compliance requires that if you have created a
SQL-compliant database, you'd better see spec-compliant output from the
information schema. As soon as you do something outside the standard
(in this instance, grant some privileges on a schema), it becomes a
judgment call whether and how that should affect what you see in the
information schema.

It may be that the current behavior of this view is actually the best
thing, but a standards-compliance argument doesn't do anything to
convince me.

regards, tom lane

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Ian Lawrence Barwick 2013-01-16 23:27:23 Re: Re: Privileges for INFORMATION_SCHEMA.SCHEMATA (was Re: [DOCS] Small clarification in "34.41. schemata")
Previous Message Casey Allen Shobe 2013-01-14 17:49:32 Re: Privileges for INFORMATION_SCHEMA.SCHEMATA (was Re: Small clarification in "34.41. schemata")

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2013-01-14 19:07:29 Re: erroneous restore into pg_catalog schema
Previous Message Tom Lane 2013-01-14 18:01:32 Re: bugfix: --echo-hidden is not supported by \sf statements