CREATE TABLE foo (bar_id serial not null, baz_id integer not null); CREATE TABLE bar (id serial not null); CREATE TABLE baz (id serial not null);