From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Michael Gould <mgould(at)intermodalsoftwaresolutions(dot)net> |
Cc: | Postgres General Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: DDL with Reference on them. |
Date: | 2009-09-21 20:12:39 |
Message-ID: | 20090921201239.GS29793@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Benoît Carpentier | 2009-09-21 20:15:04 | Re: Benetl, a free ETL tool for files using postgreSQL, is out in version 3.0 |
Previous Message | Scot Kreienkamp | 2009-09-21 20:03:34 | Re: VMWare file system / database corruption |