Shared table across all databases

From: "Mourad EL HADJ MIMOUNE" <mimoune(at)ensma(dot)fr>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Shared table across all databases
Date: 2002-07-10 13:28:54
Message-ID: 004801c22815$bcf740a0$71a337c1@ensma.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

Hi,
There are some ways to create or make table shared across all databases in
the cluster?
I have created a table in the template1 and I updated his definition in
pg_class like in the exemple below:
$ psql template1
.....
template1=# CREATE TABLE shared_table (ID SERIAL8,
template1=#
name VARCHAR UNIQUE);
create sequence......
create index ...........
CREATE
template1=# UPDATE pg_class SET relisshared = TRUE WHERE relname
='shared_table';
UPDATE 1
template1=# insert into shared_table values (1, 'test');
NOTICE: RelationBuildDesc: can't open shared_table: No such file or
directory
ERROR: cannot open shared_table: No such file or directory
NOTICE: RelationBuildDesc: can't open shared_table: No such file or
directory
ERROR: cannot open shared_table: No such file or directory

So, I made some investigation and I realised that shared tables are stored
in C:\cygwin\usr\local\pgsql\data\global.
But the shared_table I created is stored in the
C:\cygwin\usr\local\pgsql\data\base\test.
There is some command which allows shared tables creation?
Thanks for your help.
Mourad.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephane Bortzmeyer 2002-07-10 13:33:39 Re: Disabling case sensitivity
Previous Message Michael Meskes 2002-07-10 13:22:00 Re: Disabling case sensitivity

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2002-07-10 13:45:27 Re: Getting result set metadata without executing query?
Previous Message Jörg Schulz 2002-07-10 10:13:39 Re: update problem?