Re: SET within a function? - Mailing list pgsql-general

From Stephan Szabo
Subject Re: SET within a function?
Date
Msg-id 20031015200033.W31080@megazone.bigpanda.com
Whole thread Raw
In response to Re: SET within a function?  (Edmund Dengler <edmundd@eSentire.com>)
List pgsql-general
On Wed, 15 Oct 2003, Edmund Dengler wrote:

> Note that as a prime example of how postgresql itself is not "consistent"
> (in the strictest sense) is GROUP BY which treats NULL == NULL
> (interesting side bar, is there a way to cause GROUP BY to treat NULLs as
> not equal to each other?). In a theoretical question, how is this
> justified if NULL should not equal to NULL (other than "it is in the
> spec")?

Because it's not defined in terms of equality. ;)  GROUP BY is defined by
value "distinct"ness, where distinct has a very specific definition in the
spec (which treats two NULL values as not distinct).

You might actually be able to find some way to use that to your advantage,
but I'm not sure how.

pgsql-general by date:

Previous
From: Dennis Gearon
Date:
Subject: Re: Porting Code to Postgresql
Next
From: Dennis Gearon
Date:
Subject: Re: Porting Code to Postgresql