On Tue, 26 Mar 2002, Christopher Kings-Lynne wrote:
> > Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> > > I have throught of at least two problems with changing nullability. The
> > > first is primary keys. I have to prevent people setting a
> > column involved
> > > in a PK to null, right?
> > Probably so.
> And foreign keys - foreign keys only have to reference UNIQUE, right? The
> nullability isn't an issue?
That should be fine.
> Lastly - in a multicolumn primary key, does EVERY column in the key need to
> be NOT NULL?
Well, it looks like the primary key will not be satisfied if any of the
values are NULL.
In my SQL 92 draft, 11.7 Syntax Rules 3a says:
If the <unique specification> specifies PRIMARY KEY, then let
SC be the <search condition>:
UNIQUE ( SELECT UCL FROM TN )
( UCL ) IS NOT NULL
In response to
pgsql-hackers by date
|Next:||From: Nicolas Bazin||Date: 2002-03-26 06:21:31|
|Subject: build of 7.2.1 on SCO Openserver and Unixware 7.1.1|
|Previous:||From: Tom Lane||Date: 2002-03-26 05:42:46|
|Subject: Re: Rolling v7.2.1 ... |