Re: SET within a function?

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Edmund Dengler <edmundd(at)eSentire(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Mike Mascari <mascarm(at)mascari(dot)com>, Bruno Wolff III <bruno(at)wolff(dot)to>, pgsql-general(at)postgresql(dot)org
Subject: Re: SET within a function?
Date: 2003-10-16 03:02:36
Message-ID: 20031015200033.W31080@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2003-10-16 03:16:10 Re: Porting Code to Postgresql
Previous Message Dennis Gearon 2003-10-16 02:51:00 Re: Porting Code to Postgresql