Re: Foreign Key Non-Null Problem in 8.0

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Foreign Key Non-Null Problem in 8.0
Дата
Msg-id 20041030232032.D96785@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Foreign Key Non-Null Problem in 8.0  ("Jon Uhal" <juhal@dawning.com>)
Список pgsql-sql
On Wed, 27 Oct 2004, Jon Uhal wrote:

> I'm having trouble trying to get my databases setup so that when I
> delete a row from the base table, all related information is removed as
> well.  I've been testing this with PostgreSQL version (postmaster
> (PostgreSQL) 8.0.0beta1) on a Windows 2000 Pro machine.  I have been
> unsuccessful in trying to get the MATCH SIMPLE clause of CREATE TABLE to
> work and I was thinking it was because of how I had defined my tables.
> Every time I try to create a foreign key or reference into another
> table, postgres seems to make the column NOT NULL.  I have been unable
> to get it to allow nulls in the foriegn key column.

Actually, I think the problem is that you're defining the foreign columns
as serial (which appears to imply not null).  You probably want them to be
int4.


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

Предыдущее
От: Murphy Pope
Дата:
Сообщение: Re: ORDER BY and NULLs
Следующее
От: nialllinden@yahoo.com (Niall Linden)
Дата:
Сообщение: paertially restoring a DB