Re: creating tables that are visible across databases

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: mark(at)summersault(dot)com
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: creating tables that are visible across databases
Date: 2001-04-20 21:13:20
Message-ID: 28381.987801200@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Mark Stosberg <mark(at)summersault(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jeff Hoffmann 2001-04-20 21:18:21 Re: creating tables that are visible across databases
Previous Message Mark Stosberg 2001-04-20 20:38:09 creating tables that are visible across databases