Re: Proposal for SYNONYMS

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, josh(at)agliodbs(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposal for SYNONYMS
Date: 2006-03-10 21:51:35
Message-ID: 21389.1142027495@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kris Jurka <books(at)ejurka(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-03-10 23:20:59 Re: problem with large maintenance_work_mem settings and
Previous Message Luke Lonergan 2006-03-10 21:26:52 Re: random observations while testing with a 1,8B row