From 4d10455cf1c72b50d846042f4661908577d9b8c9 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Tue, 26 May 2020 11:33:51 -0400 Subject: [PATCH] note on aggregate --- postgres/aggregate.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/postgres/aggregate.md b/postgres/aggregate.md index 41c9e66..90cf610 100644 --- a/postgres/aggregate.md +++ b/postgres/aggregate.md @@ -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='{}' -); \ No newline at end of file +); +```