pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: John Scalia <jayknowsunix@gmail.com>
Cc: Keith <keith@keithf4.com>
Cc: Pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Strange inconsistency using psql
Date: Wed, 18 Dec 2019 14:01:48 -0500
Message-ID: <13321.1576695708@sss.pgh.pa.us> (raw)
In-Reply-To: <8C7A5C93-FBA2-49A7-AF59-1314585F67A0@gmail.com>
References: <CAHw75vt=iodvVhKb+EzGCwXBzG2og6bdMzQV7HJSeKw7meriow@mail.gmail.com>
	<8C7A5C93-FBA2-49A7-AF59-1314585F67A0@gmail.com>

John Scalia <jayknowsunix@gmail.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





view thread (4+ messages)

Message-ID: <13321.1576695708@sss.pgh.pa.us>
Permalink:  ../13321.1576695708@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13321.1576695708@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jayknowsunix@gmail.com, keith@keithf4.com
  Subject: Re: Strange inconsistency using psql
  In-Reply-To: <13321.1576695708@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox