Re: BUG #2771: NULL values in FOREIGN KEY fields

Поиск
Список
Период
Сортировка
От Jaime Casanova
Тема Re: BUG #2771: NULL values in FOREIGN KEY fields
Дата
Msg-id c2d9e70e0611201803g7d630698ibf1572ec586aa85@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #2771: NULL values in FOREIGN KEY fields  ("vincent" <vincent@iim.nctu.edu.tw>)
Список pgsql-bugs
On 11/20/06, vincent <vincent@iim.nctu.edu.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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #2759: \df doesn't show functions with no args
Следующее
От: Euler Taveira de Oliveira
Дата:
Сообщение: Re: BUG #2771: NULL values in FOREIGN KEY fields