Received: from sss.pgh.pa.us ([216.151.103.158]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3KLDW387342 for ; Fri, 20 Apr 2001 17:13:32 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f3KLDKR28384; Fri, 20 Apr 2001 17:13:20 -0400 (EDT) To: mark@summersault.com cc: pgsql-sql@postgresql.org Subject: Re: creating tables that are visible across databases In-reply-to: <3AE09E0F.FECB955D@summersault.com> References: <3AE09E0F.FECB955D@summersault.com> Comments: In-reply-to Mark Stosberg message dated "Fri, 20 Apr 2001 15:38:09 -0500" Date: Fri, 20 Apr 2001 17:13:20 -0400 Message-ID: <28381.987801200@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200104/343 X-Sequence-Number: 2701 Mark Stosberg 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