Re: aggregate of bitstrings - Mailing list pgsql-general

From Florian G. Pflug
Subject Re: aggregate of bitstrings
Date
Msg-id 449B3E26.7040006@phlo.org
Whole thread Raw
In response to aggregate of bitstrings  (TJ O'Donnell <tjo@acm.org>)
List pgsql-general
TJ O'Donnell wrote:
> AHA!  I hadn't encountered any null values in my bitstrings.
> and having to include 'where xxx is not null' is rather
> inconvenient and easy to forget.
>
> indeed bitor(B'1000',null) returns null
>
> but as a test, i nulled one row's data (the bitstring column portion only)
> and my orsum without INITCOND returned the proper OR of the remaining
> values
> when including all rows in the aggregate.  it did not return null.
Hm.. strange.. I could have sworn that I added the initcond to fix some
null-related issue...
Maybe is was the aggregate returning null where there where no rows
to aggregate.. I'll test this again, I'd actually love to get rid of
that initcond.

greetings, Florian Pflug

pgsql-general by date:

Previous
From: Joseph Shraibman
Date:
Subject: Idea for vacuuming
Next
From: "Ricardo Vaz"
Date:
Subject: Copy from text file