| From: | "Jaime Casanova" <systemguards(at)gmail(dot)com> | 
|---|---|
| To: | vincent <vincent(at)iim(dot)nctu(dot)edu(dot)tw> | 
| Cc: | pgsql-bugs(at)postgresql(dot)org | 
| Subject: | Re: BUG #2771: NULL values in FOREIGN KEY fields | 
| Date: | 2006-11-21 02:03:15 | 
| Message-ID: | c2d9e70e0611201803g7d630698ibf1572ec586aa85@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-bugs | 
On 11/20/06, vincent <vincent(at)iim(dot)nctu(dot)edu(dot)tw> wrote:
> When insert a null value in foreign key fields, an error occurs.
>
> CREATE TABLE TGroup (
>   C_Group_ID CHAR(8) NOT NULL,
>   C_Group_Name VARCHAR(50),
>   C_Group_Parent CHAR(8) NOT NULL,
>   CONSTRAINT TGroup_C_Group_Parent_fkey FOREIGN KEY (C_Group_Parent)
That's because your C_Group_Parent column has a Not Null constraint
and you can't insert null values in a Not Null columns
-- 
regards,
Jaime Casanova
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
                                       Richard Cook
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Euler Taveira de Oliveira | 2006-11-21 02:28:46 | Re: BUG #2771: NULL values in FOREIGN KEY fields | 
| Previous Message | Tom Lane | 2006-11-21 01:58:10 | Re: BUG #2768: dates before year 1600 in timestamptz column give strange results |