Re: creating tables that are visible across databases

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: creating tables that are visible across databases
Дата
Msg-id 28381.987801200@sss.pgh.pa.us
обсуждение исходный текст
Ответ на creating tables that are visible across databases  (Mark Stosberg <mark@summersault.com>)
Список pgsql-sql
Mark Stosberg <mark@summersault.com> writes:
>   I'd like to create some tables that would visible across databases,
> much like the postgres system tables. These would be for "static" data,
> such as state and country codes, and geo-spatial data. I couldn't find
> this mentioned in the docs, but unless this feature of the system tables
> is magical, it appears to be possible.

Unfortunately, it is magic ... see IsSharedSystemRelationName() for more
info.  Possibly you could hack that routine to allow certain other names
to be considered shared.

It looks to me like some of the uses of IsSharedSystemRelationName
could/should be replaced by examining pg_class.relisshared, but in other
places it's really necessary to determine sharedness with nothing but a
relname to go on.

This will all need to be rethought when we implement schemas, anyway...
        regards, tom lane


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

Предыдущее
От: Mark Stosberg
Дата:
Сообщение: creating tables that are visible across databases
Следующее
От: Jeff Hoffmann
Дата:
Сообщение: Re: creating tables that are visible across databases