On 12/30/2016 08:51 AM, Rich Shepard wrote:
On Fri, 30 Dec 2016, David G. Johnston wrote:
"The CHECK clause specifies an expression producing a Boolean result
which
new or updated rows must satisfy for an insert or update operation to
succeed. Expressions evaluating to TRUE or UNKNOWN succeed."
On 12/30/2016 06:46 AM, Adrian Klaver wrote:
On 12/30/2016 06:38 AM, Rich Shepard wrote:
test=> \d default_test
Table "public.default_test"
Column | Type| Modifiers
+---+---
id | integer |
fld_1 | character varying |
To
On Fri, 30 Dec 2016, David G. Johnston wrote:
"The CHECK clause specifies an expression producing a Boolean result which
new or updated rows must satisfy for an insert or update operation to
succeed. Expressions evaluating to TRUE or UNKNOWN succeed."
NULL == "UNKNOWN"
David,
I forgot abou
On Fri, Dec 30, 2016 at 9:19 AM, Rich Shepard
wrote:
> On Fri, 30 Dec 2016, Adrian Klaver wrote:
>
> DEFAULT is what is the column is set to if the user does not specify a
>> value. As shown above a user can supply a NULL value. To guard against
>> that the NOT NULL constraint is required.
>>
>
>
On Fri, 30 Dec 2016, Adrian Klaver wrote:
DEFAULT is what is the column is set to if the user does not specify a
value. As shown above a user can supply a NULL value. To guard against
that the NOT NULL constraint is required.
One more case I'd appreciate being clarified: when the column's va
On Fri, 30 Dec 2016, Adrian Klaver wrote:
DEFAULT is what is the column is set to if the user does not specify a
value. As shown above a user can supply a NULL value. To guard against
that the NOT NULL constraint is required.
Thanks, Adrian. This was not clear to me when I read the manual.
On Fri, 30 Dec 2016, Tom Lane wrote:
No, because you can explicitly insert a null. DEFAULT only controls what
happens when you omit the column in an INSERT command.
tom,
Thanks for clarifying. I did not pick this up from reading the manual and
knew that NULL could be an explicitly-defined d
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 NOT NUL
Rich Shepard writes:
>If a column has a default value specified does this mean the column cannot
> contain a NULL value? In other words, is DEFAULT NOT NULL
> redundant?
No, because you can explicitly insert a null. DEFAULT only controls
what happens when you omit the column in an INSERT co
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 NOT NULL
redundan
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 NOT NULL
redundant?
TIA,
Rich
--
Sent via pgsql-general ma
On Tue, 2005-05-03 at 17:31, Roderick A. Anderson wrote:
> I am trying to come up with a method to have a default value for a
> column based on a function and other columns. I'm hoping ( well not too
> much ) that what I figure out here will apply to MS SQL Server as I am
> stuck using it unles
I am trying to come up with a method to have a default value for a
column based on a function and other columns. I'm hoping ( well not too
much ) that what I figure out here will apply to MS SQL Server as I am
stuck using it unless I can prove there ain't no way it's going to
happen. ( Now th
13 matches
Mail list logo