Re: Do we want SYNONYMS? - Mailing list pgsql-general

From Andy Colson
Subject Re: Do we want SYNONYMS?
Date
Msg-id 4CFE884F.9010006@squeakycode.net
Whole thread Raw
In response to Re: Do we want SYNONYMS?  (Adrian Klaver <adrian.klaver@gmail.com>)
List pgsql-general
On 12/7/2010 1:07 PM, Adrian Klaver wrote:
> On 12/07/2010 10:45 AM, Joshua D. Drake wrote:
>> On Tue, 2010-12-07 at 08:31 -0500, Vick Khera wrote:
>>> On Mon, Dec 6, 2010 at 2:31 PM, Joshua D. Drake<jd@commandprompt.com>
>>> wrote:
>>>> Command Prompt is currently considering writing a patch to provide
>>>> synonyms to PostgreSQL. Is this something the community is interested
>>>> in? Do we have use cases for it? MSSQL, DB2 and Oracle support them.
>>>>
>>>
>>> I must be missing something, but really, what's the point of synonyms?
>>> What's the real-world use case for them?
>>
>> For a PostgreSQL Person? I see no real benefit to be honest. For people
>> coming from Oracle, DB2 or MSSQL? I see a real benefit in terms of ease
>> of porting.
>>
>> I asked on the Oracle free list[1] and Synonyms are used and used a lot
>> in Oracle. Anything we can do to help those folks run screaming from
>> err.... port to PostgreSQL seems like a good idea. (Assuming we can do
>> it reasonably)
>>
>> Sincerely,
>>
>> Joshua D. Drake
>
> If I am following this thread correctly the biggest issue to date is
> getting an apple to apple comparison. The confusion seems to be that
> what is proposed for SYNONYMS in Pg is not actually a synonym for
> SYNONYMS in Oracle.
>
>
:-) I see what you did there!


I think it covers parts.  In both you can create an alias to a table,
both of which you can fire off insert/update/delete.  I assume in PG you
could have different permissions for the table and the alias, which I
assume you can do in oracle.

If we pretend oracle and PG both have the same thing as a schema, and
using PG's definition of schema:

I assume in oracle you can "create table synonym schemaA.bob for
schemaB.tablex"

And I assume you could do the same in PG.

However beyond that, I dont know what oracle supports that we'd need.

(need, as in, oracle synonyms between different database instances on
different computers is not going to happen.)

-Andy

pgsql-general by date:

Previous
From: Raimon Fernandez
Date:
Subject: Re: SELECT is immediate but the UPDATE takes forever
Next
From: Tom Lane
Date:
Subject: Re: Hanging with pg_restore and large objects