From: Alvaro Herrera <alvherre@commandprompt.com>
To: George Young <gry@ll.mit.edu>
Cc: pgsql-sql@postgresql.org
Subject: Re: trigger to enforce FK with nulls?
Date: Wed, 12 Apr 2006 21:22:22 -0400
Message-ID: <20060413012221.GB14482@surnet.cl> (raw)
In-Reply-To: <20060412211118.05411612.gry@ll.mit.edu>
References: <20060412211118.05411612.gry@ll.mit.edu>
George Young wrote:
> Since foreign keys per se can't do this, I presume the way
> is to use triggers, though I have not used triggers before.
Says who? Just don't specify NOT NULL on the referencing column.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: alvherre@commandprompt.com, gry@ll.mit.edu
Subject: Re: trigger to enforce FK with nulls?
In-Reply-To: <20060413012221.GB14482@surnet.cl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox