The easiest way might be to use table inheritance.
--- "Olinga K. Abbott" <olingaa@yahoo.com> wrote:
> Let's say I have the following contrived schema:
>
> TRANSPORTATION_MODE
> mode_ID serial
> model_number text
>
> AIRPLANE
> mode_ID int FK
> operational_ceiling nt
>
> AUTOMOBILE
> mode_ID int FK
> cruising range int
>
>
> Of course, being an airplane and being an automobile are mutually exclusive.
> How does one program the mutual exclusivity in PostgreSQL? I've studied using
> check contraints, triggers, and rules, but I'm not finding any obvious way to
> program this.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>