On 12/30/2016 06:38 AM, Rich Shepard wrote:
> Reading the 9.6 docs suggests an answer to my question, but does not
> explicitly answer it, so I ask here.
>
> If a column has a default value specified does this mean the column
> cannot
> contain a NULL value? In other words, is DEFAULT <some_value> NOT NULL
> redundant?
No:
test=> create table default_test(id int, fld_1 varchar DEFAULT NULL);
CREATE TABLE
test=> \d default_test
Table "public.default_test"
Column | Type | Modifiers
--------+-------------------+-----------
id | integer |
fld_1 | character varying |
>
> TIA,
>
> Rich
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com