From: | Alexey Klyukin <alexk(at)commandprompt(dot)com> |
---|---|
To: | Jasen Betts <jasen(at)xnet(dot)co(dot)nz> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Do we want SYNONYMS? |
Date: | 2010-12-13 15:39:10 |
Message-ID: | 19E6350A-FC98-4CF9-AE41-62C21331ABC2@commandprompt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Dec 13, 2010, at 12:03 PM, Jasen Betts wrote:
> On 2010-12-07, Andy Colson <andy(at)squeakycode(dot)net> wrote:
>
>> 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.
>
> They want synonyms for functions, but as far as I can see the same can be
> achieved with minimal extra work by creating a new LANGUAGE SQL function
> that calls the original.
>
> CREATE FUNCTION newschema.newname( atype ... ) RETURNS rtype
> AS ' select oldschema.oldname ( $1 ... ) ' LANGUAGE SQL;
>
> with apropriare values for the lowercase bits and elipsis.
This could possibly lead to performance issues , and there would be no error
or warning message if you occasionally drop the oldschema.oldname, rendering
the newschema.newname useless.
/A
--
Alexey Klyukin http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc
From | Date | Subject | |
---|---|---|---|
Next Message | Alexey Klyukin | 2010-12-13 15:46:59 | Re: Do we want SYNONYMS? |
Previous Message | Gabriele Bartolini | 2010-12-13 15:11:20 | Re: Cluster with LATIN1 and UTF-8 |