Thread: reference to system table
Hello everybody! Is there a way to create reference to any system relation? For example I'd like to create relation which extends pg_shadow with some attributes such as reference to relation of physical person, information about worker etcetera. Thanks in advance -- Anton ps My stupid tries: If I've tried to create reference to pg_shadow(usesysid) pgsql raised an error. Then I've tried to inherit pg_shadow but due to inheritance restriction usesysid and usename become not unique. And if I insert a tuple into new relation user shouldn't appear in the db.
On Sun, 19 Jan 2003, Anton wrote: > Is there a way to create reference to any system relation? Not really in general. System tables aren't guaranteed to go through the same steps for updating as user tables.
Stephan Szabo wrote: > On Sun, 19 Jan 2003, Anton wrote: > > > Is there a way to create reference to any system relation? > > Not really in general. System tables aren't guaranteed to go > through the same steps for updating as user tables. Right. The best you can do is to create a table that has the extra column and a userid column, then create a join that shows the join of pg_shadow and your new table. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073