Re: DDL with Reference on them. - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: DDL with Reference on them.
Date
Msg-id 20090921201239.GS29793@alvh.no-ip.org
Whole thread Raw
In response to DDL with Reference on them.  (Michael Gould <mgould@intermodalsoftwaresolutions.net>)
List pgsql-general
Michael Gould wrote:

> As you can see there are a few columns which reference back to another
> table.  What I need to know is how does Postgres work with these columns.
> Can I insert or update a row if those columns are null or are they required
> to have a non-null value in order for the row to be inserted or saved?

If they are NULL, they are not checked against the other table.  If you
want the value to be always checked, add a NOT NULL constraint to those
columns.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-general by date:

Previous
From: "Scot Kreienkamp"
Date:
Subject: Re: VMWare file system / database corruption
Next
From: John R Pierce
Date:
Subject: Re: VMWare file system / database corruption