Re: [GENERAL] Default column value - Mailing list pgsql-general

From Tom Lane
Subject Re: [GENERAL] Default column value
Date
Msg-id 13236.1483109692@sss.pgh.pa.us
Whole thread Raw
In response to [GENERAL] Default column value  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: [GENERAL] Default column value
List pgsql-general
Rich Shepard <rshepard@appl-ecosys.com> writes:
>    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, because you can explicitly insert a null.  DEFAULT only controls
what happens when you omit the column in an INSERT command.

            regards, tom lane


pgsql-general by date:

Previous
From: "btober@computer.org"
Date:
Subject: Re: [GENERAL] LYDB: Feasible to use PG roles instead ofapplication-level security?
Next
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] Default column value