Search Postgresql Archives

Re: DDL with Reference on them.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux