CREATE TABLE hobby ( ) inherits (object); create unique index idx_hobby_uid on hobby (uid); create index idx_hobby_ref_statut on hobby (ref_statut); alter table hobby alter column ref_statut set default 0; alter table hobby alter column datecrea set default now(); alter table hobby alter column ztitle set default 'indefini'; alter table hobby alter column datemodif set default now(); CREATE TABLE hobbies_des_contacts ( ref_contact int4 DEFAULT 0, ref_hobby int4 DEFAULT 0 ) inherits (object); create unique index idx_hobbies_des_contacts_uid on hobbies_des_contacts (uid); create index idx_es_des_contacts_ref_contact on hobbies_des_contacts (ref_contact); create index idx_bies_des_contacts_ref_hobby on hobbies_des_contacts (ref_hobby); create unique index idx_s_ref_contact_ref_hobby_key on hobbies_des_contacts (ref_contact,ref_hobby); create index idx_ies_des_contacts_ref_statut on hobbies_des_contacts (ref_statut); alter table hobbies_des_contacts alter column ref_statut set default 0; alter table hobbies_des_contacts alter column datecrea set default now(); alter table hobbies_des_contacts alter column ztitle set default 'indefini'; alter table hobbies_des_contacts alter column datemodif set default now();