Inheritence and Integrity

Поиск
Список
Период
Сортировка
От Neal Lindsay
Тема Inheritence and Integrity
Дата
Msg-id b19bkt$5t9$1@news.hub.org
обсуждение исходный текст
Ответы Re: Inheritence and Integrity  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Re: Inheritence and Integrity  (chester c young <chestercyoung@yahoo.com>)
Список pgsql-sql
I am creating a database that will keep track of several different types 
of 'events'. I am toying with the idea of making a base 'class' table 
for the tables because a lot of the information will be the same (also 
there will probably be times I just need to get the basic information 
about events regardless of their type). My question is: will triggers 
and rules on the parent table fire when I insert data in the child 
tables? Are there any other potential pitfalls?

Thank you,
-Neal Lindsay

P.S. Here is a simplified example of my schema:

CREATE TABLE parenttable (recordid SERIAL PRIMARY KEY,recordname text
);

CREATE TABLE childtablea (afield int4
) INHERITS parenttable;

CREATE TABLE childtableb (bfield text
) INHERITS parenttable;

CREATE TABLE extrainfo (extrainfoid SERIAL PRIMARY KEY,record_fkey int4 NOT NULL REFERENCES
parenttable(recordid),extrainfotexttext
 
);



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

Предыдущее
От: "Moritz Lennert"
Дата:
Сообщение: plpgsql: return results of a dynamic query
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Inheritence and Integrity