Re: Proposal for SYNONYMS - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Proposal for SYNONYMS
Date
Msg-id 21389.1142027495@sss.pgh.pa.us
Whole thread Raw
In response to Re: Proposal for SYNONYMS  (Kris Jurka <books@ejurka.com>)
Responses Re: Proposal for SYNONYMS
List pgsql-hackers
Kris Jurka <books@ejurka.com> writes:
> One key difference would be that synonyms track schema updates, like 
> adding a column, to the referenced object that a view would not.

That raises a fairly interesting point, actually.  What would you expect
to happen here:
CREATE TABLE foo ...;CREATE SYNONYM bar FOR foo;CREATE VIEW v AS SELECT * FROM bar;DROP SYNONYM bar;

With the implementations being proposed, v would effectively be stored
as "SELECT * FROM foo" and thus would be unaffected by the DROP SYNONYM.
Is that what people will expect?  Is it what happens in Oracle?
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Luke Lonergan"
Date:
Subject: Re: random observations while testing with a 1,8B row
Next
From: Ragnar
Date:
Subject: Re: Proposal for SYNONYMS