Re: Proposal for SYNONYMS - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Proposal for SYNONYMS
Date
Msg-id 28106.1141942991@sss.pgh.pa.us
Whole thread Raw
In response to Re: Proposal for SYNONYMS  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Responses Re: Proposal for SYNONYMS  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Re: Proposal for SYNONYMS  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> On Thu, 9 Mar 2006, Josh Berkus wrote:
>> 2) For my comprehension, what's the difference between a SYNONYM and a
>> single-object (possibly updatable) view?

> I think with the plan as described, the permissions handling is slightly
> different from how we handle views. As I understood the synonym plan, a
> person with select on the synonym but not on the referenced table wouldn't
> be able to select through the synonym, while if the view was created by
> someone with select a person with select on the view could select through
> the view.

I was under the impression that privileges on the synonym wouldn't mean
anything at all, with the exception that we'd track its ownership to
determine who is allowed to drop the synonym.

The point about views is a good one.  I don't buy the argument that
"we should do synonyms instead of updatable views because it's easier".
We *will* do updatable views at some point because (a) the spec requires
it and (b) it's clearly useful.  I'm not eager to be stuck with synonyms
forever because somebody thought they could implement one and not the
other.

(BTW, there was some work being done on updatable views, but I think
it's stalled.  I suspect the reason is that our current rule system
is just too odd to support updatable views reasonably.  I've been
wondering if an implementation based on allowing triggers on views
would be any more manageable.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Jonah H. Harris"
Date:
Subject: Re: Proposal for SYNONYMS
Next
From: elein
Date:
Subject: Re: Proposal for SYNONYMS