note on aggregate

This commit is contained in:
Paul Trowbridge 2020-05-26 11:33:51 -04:00
parent 1e2c166ed8
commit 4d10455cf1
1 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
To extract aggregate definitions can select from `pg_aggregate`
SQL for current aggregates I'm using now:
```
CREATE OR REPLACE FUNCTION public.jsonb_concat(
state jsonb,
concat jsonb)
@ -40,4 +45,5 @@ CREATE AGGREGATE public.jsonb_obj_aggc(jsonb) (
SFUNC=public.jsonb_concat,
STYPE=jsonb,
INITCOND='{}'
);
);
```