Skip site navigation (1) Skip section navigation (2)

pgsql-server: The added aggregates are: (1) boolean-and and boolean-or

From: momjian(at)svr1(dot)postgresql(dot)org (Bruce Momjian)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql-server: The added aggregates are: (1) boolean-and and boolean-or
Date: 2004-05-26 15:26:47
Message-ID: 20040526152647.8B126D1CF0B@svr1.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
The added aggregates are:

(1) boolean-and and boolean-or aggregates named bool_and and bool_or.
    they (SHOULD;-) correspond to standard sql every and some/any aggregates.
    they do not have the right name as there is a problem with
    the standard and the parser for some/any. Tom also think that
    the standard name is misleading because NULL are ignored.
    Also add 'every' aggregate.

(2) bitwise integer aggregates named bit_and and bit_or for
    int2, int4, int8 and bit types. They are not standard, but I find
    them useful. I needed them once.


The patches adds:

- 2 new very short strict functions for boolean aggregates in
  src/backed/utils/adt/bool.c,
  src/include/utils/builtins.h and src/include/catalog/pg_proc.h

- the new aggregates declared in src/include/catalog/pg_proc.h and
  src/include/catalog/pg_aggregate.h

- some documentation and validation about these new aggregates.

Fabien COELHO

Modified Files:
--------------
    pgsql-server/doc/src/sgml:
        func.sgml (r1.203 -> r1.204)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/doc/src/sgml/func.sgml.diff?r1=1.203&r2=1.204)
    pgsql-server/src/backend/utils/adt:
        bool.c (r1.32 -> r1.33)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/adt/bool.c.diff?r1=1.32&r2=1.33)
    pgsql-server/src/include/catalog:
        catversion.h (r1.230 -> r1.231)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/catalog/catversion.h.diff?r1=1.230&r2=1.231)
        pg_aggregate.h (r1.42 -> r1.43)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/catalog/pg_aggregate.h.diff?r1=1.42&r2=1.43)
        pg_proc.h (r1.329 -> r1.330)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/catalog/pg_proc.h.diff?r1=1.329&r2=1.330)
    pgsql-server/src/include/utils:
        builtins.h (r1.238 -> r1.239)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/utils/builtins.h.diff?r1=1.238&r2=1.239)
    pgsql-server/src/test/regress/expected:
        aggregates.out (r1.10 -> r1.11)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/test/regress/expected/aggregates.out.diff?r1=1.10&r2=1.11)
    pgsql-server/src/test/regress/sql:
        aggregates.sql (r1.8 -> r1.9)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/test/regress/sql/aggregates.sql.diff?r1=1.8&r2=1.9)

pgsql-committers by date

Next:From: Tom LaneDate: 2004-05-26 16:16:03
Subject: pgsql-server: Add <limits.h>, per Magnus.
Previous:From: Bruce MomjianDate: 2004-05-26 15:07:44
Subject: pgsql-server: The patch adresses the TODO list item "Allow external

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group