Re: table synonyms

From: Tino Wildenhain <tino(at)wildenhain(dot)de>
To: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>
Cc: jjeffman(at)cpovo(dot)net, Postgresql-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: table synonyms
Date: 2005-05-24 16:39:29
Message-ID: 1116952770.6139.21.camel@Andrea.peacock.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Am Dienstag, den 24.05.2005, 10:37 -0500 schrieb Mike Nolan:
> > > I hope anybody can help me on this subject. The problem is not to find
> > > a substitute for the Oracle synonyms, but a way to write queries
> > > which, reliably, can be used no matter the schema which owns the
> > > tables.
> >
> > Maybe you use views?
>
> Unless it changed in 8, you can't insert into or update a view.
>
> I don't know if rules will do the trick or not, to be honest I haven't
> figured out what they can and cannot do.

Yes, since views are basically constructed via rules, you can extend
them with rules for update, insert etc. as well.

> As someone who used to use synonyms at the user/schema level in Oracle
> as a way to restrict access to a subset tables based on user-specific
> criteria (eg, restricting salesman 'X' to only his accounts in the customer
> master table), yes, synonyms would be nice.

Views I'd say. Or you do it via SRF (set returning functions)
to isolate access.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message jjeffman 2005-05-24 16:49:40 Re: table synonyms
Previous Message Marc Soleda 2005-05-24 16:18:46 pg_autovacuum WinXP service