Re: Query performance problem - Mailing list pgsql-sql

From Ragnar Hafstað
Subject Re: Query performance problem
Date
Msg-id 1111131172.25405.17.camel@localhost.localdomain
Whole thread Raw
In response to Re: Query performance problem  (Kenneth Gonsalves <lawgon@thenilgiris.com>)
Responses Re: Query performance problem
List pgsql-sql
On Fri, 2005-03-18 at 10:49 +0530, Kenneth Gonsalves wrote:
> On Thursday 17 Mar 2005 7:35 pm, Richard Huxton wrote:
> 
> > Not necessarily. NOT NULL here helps to ensure you can add values
> > together without the risk of a null result. There are plenty of
> > "amount" columns that should be not-null (total spent, total
> > ordered etc).
> 
> that makes sense - but is it necessary to have a not null constraint 
> when there is a default value?

DEFAULT applies to INSERTs, NOT NULL applies to UPDATEs too.

gnari




pgsql-sql by date:

Previous
From: Kenneth Gonsalves
Date:
Subject: Re: Query performance problem
Next
From: PFC
Date:
Subject: Re: Query performance problem