From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Jon Uhal <juhal@dawning.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Foreign Key Non-Null Problem in 8.0
Date: Sat, 30 Oct 2004 23:22:00 -0700 (PDT)
Message-ID: <20041030232032.D96785@megazone.bigpanda.com> (raw)
In-Reply-To: <001d01c4bc36$faa13020$3b0ba8c0@uhal2000>
References: <001d01c4bc36$faa13020$3b0ba8c0@uhal2000>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sszabo@megazone.bigpanda.com, juhal@dawning.com
Subject: Re: Foreign Key Non-Null Problem in 8.0
In-Reply-To: <20041030232032.D96785@megazone.bigpanda.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox