Re: Another proposal for table synonyms

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Another proposal for table synonyms
Дата
Msg-id 27415.1291134532@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Another proposal for table synonyms  (Alexey Klyukin <alexk@commandprompt.com>)
Ответы Re: Another proposal for table synonyms  (Alexey Klyukin <alexk@commandprompt.com>)
Список pgsql-hackers
Alexey Klyukin <alexk@commandprompt.com> writes:
> To support addition of new database objects types that can be referenced by
> synonyms a new system catalog, pg_synonym, is to be added, with an oid to
> support comments on synonym, and the following schema:

This is not going to work, at least not without making every type of
lookup consult pg_synonym too, which I think can be considered DOA
because of its performance impact on people who aren't even using the
feature.  It's also quite unclear how you prevent duplicate names
if the synonyms are in their own catalog.  (And no, the part of your
proposal that says you're not preventing that isn't acceptable from
a usability standpoint.)

You could reasonably support synonyms for tables/views by storing them
in pg_class with a new relkind.  This doesn't cover synonyms for other
object types, but since the total world demand for such a feature is
approximately zero, that's not really a problem.
        regards, tom lane


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: crash-safe visibility map, take three
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: crash-safe visibility map, take three