Re: Strange inconsistency using psql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John Scalia <jayknowsunix(at)gmail(dot)com>
Cc: Keith <keith(at)keithf4(dot)com>, Pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Strange inconsistency using psql
Date: 2019-12-18 19:01:48
Message-ID: 13321.1576695708@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

John Scalia <jayknowsunix(at)gmail(dot)com> writes:
> Correct, but my question really is, why is VIEW different from all the other types of objects?

It's not really -- GRANT considers all kinds of privilege-grantable
relations to be "tables", with the exception of sequences which are
different because they have a different set of applicable privileges.

If we treated views specially here then we'd also have to treat
materialized views and foreign tables as distinct things-to-grant-on,
which seems like mostly clutter.

The history of ALTER TABLE is an analogy, which I guess you could
read as support for either side. Originally PG just had ALTER TABLE
and it worked on all relation kinds (for which the ALTER was sensible).
We've since grown ALTER VIEW etc, but I don't think their coverage of
the ALTER TABLE options is quite complete --- and anyway we still let
you say ALTER TABLE, for backwards-compatibility reasons.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Wells Oliver 2019-12-19 00:42:24 Query planning around one key of a multi-column index
Previous Message Pepe TD Vo 2019-12-18 18:55:26 backup script error with could not connect to database