multicolumn PRIMARY KEY introduces wrong 'not null' fields - Mailing list pgsql-bugs

From pgsql-bugs@postgresql.org
Subject multicolumn PRIMARY KEY introduces wrong 'not null' fields
Date
Msg-id 200108210144.f7L1iKC91768@hub.org
Whole thread Raw
Responses Re: multicolumn PRIMARY KEY introduces wrong 'not null' fields  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Laurent Martelli (laurent@bearteam.org) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
multicolumn PRIMARY KEY introduces wrong 'not null' fields

Long Description
If you have a primary key on several columns, each of these columns is given the 'not null' modifier. I can't see why
thisis required. In the example below, the 'Type' column is made 'not null'. 

Sample Code
CREATE TABLE test (
        Type integer,
        PictureID integer NOT NULL REFERENCES pictures(PictureID),
        Value character varying(128) NOT NULL,
    PRIMARY KEY (Type,PictureID,Value));


No file was uploaded with this report

pgsql-bugs by date:

Previous
From: Lamar Owen
Date:
Subject: Re: Building 7.1.3 with PL/Perl support on RedHat
Next
From: Tom Lane
Date:
Subject: Re: multicolumn PRIMARY KEY introduces wrong 'not null' fields