I am loath to ask for a hand-hold here, but could you explain a little more about how to do such a thing?
It's probably easier than you think. Briefly, it goes like this:
1) read http://www.postgresql.org/docs/current/static/tutorial-inheritance.html
2) try those examples
3) In your case:
create table bob_def (surname text); create table bob () inherits (bob_def); create table bob_test () inherits (bob_def); insert into bob (surname) values ('smith'); insert into bob_test (surname) values ('gazpacho'); \d bob \d bob_test alter table bob_def add column age integer; \d bob \d bob_test update bob set age=104 where surname='smith'; select * from bob;
Note:
You'll need to index the subtables separately if that's important to you.
-Reece
-- Reece Hart, http://www.in-machina.com/~reece/, GPG:0x25EC91A0 0xD178AAF9 |