]> granicus.if.org Git - postgresql/commit
In CREATE AGGREGATE, allow the transition datatype to be "internal", but only
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 14 Nov 2008 19:47:50 +0000 (19:47 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 14 Nov 2008 19:47:50 +0000 (19:47 +0000)
commit9e0247aba5e2cac1542823a194d4dc2ea1c3abb6
tree5b5fb27746c965a5961ad16631788d113cfd6d11
parentfbaa172d6553e0139ed98405eb4f24bf196f1394
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.
src/backend/catalog/pg_aggregate.c
src/backend/commands/aggregatecmds.c