Implement OR REPLACE option for CREATE AGGREGATE.
Andrew Gierth <rhodiumtoad@postgresql.org>
Implement OR REPLACE option for CREATE AGGREGATE. Aggregates have acquired a dozen or so optional attributes in recent years for things like parallel query and moving-aggregate mode; the lack of an OR REPLACE option to add or change these for an existing agg makes extension upgrades gratuitously hard. Rectify.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/create_aggregate.sgml | modified | +18 −9 |
| src/backend/catalog/pg_aggregate.c | modified | +54 −3 |
| src/backend/catalog/pg_proc.c | modified | +4 −2 |
| src/backend/commands/aggregatecmds.c | modified | +7 −1 |
| src/backend/nodes/copyfuncs.c | modified | +1 −0 |
| src/backend/nodes/equalfuncs.c | modified | +1 −0 |
| src/backend/parser/gram.y | modified | +9 −7 |
| src/backend/tcop/utility.c | modified | +2 −1 |
| src/include/catalog/pg_aggregate.h | modified | +1 −0 |
| src/include/commands/defrem.h | modified | +1 −1 |
| src/include/nodes/parsenodes.h | modified | +1 −0 |
| src/test/regress/expected/create_aggregate.out | modified | +71 −0 |
| src/test/regress/sql/create_aggregate.sql | modified | +65 −0 |