Re: [GENERAL] Problem with a GROUP BY clause

From: Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il>
To: Mark Dalphin <mdalphin(at)amgen(dot)com>, pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Problem with a GROUP BY clause
Date: 1999-08-01 14:35:55
Message-ID: l03130304b3ca0b616eeb@[147.233.159.109]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 03:52 +0300 on 01/08/1999, Mark Dalphin wrote:

> There is no row, yet Postgresql reports there is "one" which it returns as
> empty. This also makes the Perl DBI::DBD interface unhappy. It seems to
>return
> an undefined value which can't even be tested with "if(! defined $value)"!
>
> Unless I really misunderstand "GROUP BY", I think this is a bug.

We had this discussion in the past and I think you are right in saying that
under "GROUP BY", this behaviour is a bug. However, it is not really that
hard to handle. It merely returns a row with NULL values all over. Test for
NULL in the same way you test for NULL in any field that may have NULL
values. You can be sure that if a valid grouping was returned, neither
field will be null.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma

In response to

Browse pgsql-general by date

  From Date Subject
Next Message astromonk 1999-08-01 15:06:24 Re: [ADMIN] Re: [GENERAL] Re: DBD-Pg Install problems
Previous Message Herouth Maoz 1999-08-01 14:31:07 Re: [GENERAL] Search