Re: Do we want SYNONYMS?

Поиск
Список
Период
Сортировка
От Jasen Betts
Тема Re: Do we want SYNONYMS?
Дата
Msg-id ie4r0r$scs$7@reversiblemaps.ath.cx
обсуждение исходный текст
Ответ на Do we want SYNONYMS?  ("Joshua D. Drake" <jd@commandprompt.com>)
Ответы Re: Do we want SYNONYMS?  (Alexey Klyukin <alexk@commandprompt.com>)
Список pgsql-general
On 2010-12-07, Andy Colson <andy@squeakycode.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.

--
⚂⚃ 100% natural

В списке pgsql-general по дате отправления:

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: Urgent -- High memory usage on PostgreSQL server
Следующее
От: Jasen Betts
Дата:
Сообщение: Re: encode(bytea_value, 'escape') in PostgreSQL 9.0