Andy Colson wrote:
Jun Yang wrote:
Hi all,

I want to add some common columns to all of my tables.  One way I
think would be to add a super table that contains the common columns
to all tables.  But is there a way to add a super table to existing
tables for them to inherit from?

Thanks!

Jun


as long as the parent and child has the same table struct, yes.

use:

alter table child inherit newparent;

-Andy

err... sorry, let me fix that:  the parent must have a common subset of all the 
children.  (The children can have extras the parent does not, but not visa 
versa)

-Andy

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to