[SQL] DEFAULT Constraint based on table type?

2005-11-28 Thread Announce
Lets say I have the following tables. CREATE TABLE animals(id primary key, name varchar, type varchar); CREATE TABLE dogs (breed varchar)INHERITS (animals); CREATE TABLE birds (bool hasFeathers) INHERITS (animals); Is there a way I can specify a default on the child table that will po

[SQL] Primary and Foreign Key?

2005-09-22 Thread Announce
I have the following related tables: PEOPLE -- peopleid pkey, name, etc GROUPS - groupid pkey, description, etc PEOPLEGROUPS --- peopleid pkey/fkey, groupid pkey/fkey What is the CORRECT way (in Postgres) to define the PEOPLEGROUPS table so that it has