Thread: pgsql: In CREATE AGGREGATE, allow the transition datatype to be

pgsql: In CREATE AGGREGATE, allow the transition datatype to be

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
In CREATE AGGREGATE, allow the transition datatype to be "internal", but only
if the user is superuser.  This makes available to extension modules the same
sort of trick being practiced by array_agg().  The reason for the superuser
restriction is that you could crash the system by connecting up an
incompatible pair of internal-using functions as an aggregate.  It shouldn't
interfere with any legitimate use, since you'd have to be superuser to create
the internal-using transition and final functions anyway.

Modified Files:
--------------
    pgsql/src/backend/catalog:
        pg_aggregate.c (r1.96 -> r1.97)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/pg_aggregate.c?r1=1.96&r2=1.97)
    pgsql/src/backend/commands:
        aggregatecmds.c (r1.46 -> r1.47)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/aggregatecmds.c?r1=1.46&r2=1.47)