Re: CREATE SYNONYM ...

From: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Stephan Szabo" <sszabo(at)megazone(dot)bigpanda(dot)com>, "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, "Hans-J?rgen Sch?nig" <postgres(at)cybertec(dot)at>, "Michael Glaesemann" <grzm(at)myrealbox(dot)com>, pgsql-patches(at)postgresql(dot)org, eg(at)cybertec(dot)at
Subject: Re: CREATE SYNONYM ...
Date: 2006-03-08 01:04:12
Message-ID: 36e682920603071704o4d0dbabbg88488208080f1e96@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On 3/7/06, Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
>
> Tom Lane wrote:
>
> > (Actually, I don't think the case for table synonyms has been made
> > adequately either; "Oracle has it" is *not* enough reason to take on
> > another feature that we'll have to maintain forever, especially given
> > that we're being told that one of the major use-cases for synonyms
> > isn't going to be supported. AFAICS this patch does nothing you
> > couldn't do much better with a quick search-and-replace over your
> > application code. In short, I remain unsold.)
>
> What I don't really understand is what part of this cannot be achieved
> by changing the search_path. The only case I can think of is when you
> have tables A and B in schemas R and S, but you want to use R.A and S.B.
> So there's no way to change search_path for this. But is this really
> the intended use case?

Not totally intended, but (unfortunately) used nonetheless.

I wonder whether synonyms were introduced in Oracle because of that idea
> of theirs that each user has its own schema, and can access that schema
> only; so to use a table in another schema you need to create a synonym.
> We don't have that limitation so we don't need that usage either.

No, one could do fully qualified naming in Oracle; synonyms do have other
purposes outside of this single one listed.

--
Jonah H. Harris, Database Internals Architect
EnterpriseDB Corporation
732.331.1324

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2006-03-08 01:06:24 Re: CREATE SYNONYM ...
Previous Message Jonah H. Harris 2006-03-08 00:59:58 Re: CREATE SYNONYM ...