Skip to content

Commit 4bd0ead

Browse files
committed
Using distinct in the json_agg works only with a jsonb object.
1 parent 36a7fab commit 4bd0ead

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

function/da/chronologybyid.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ AS $function$
2727
chr.ageboundolder AS AgeOlder,
2828
chr.chronologyid AS ChronologyID,
2929
chr.ageboundyounger AS AgeYounger,
30-
json_agg(DISTINCT json_build_object('DatasetType', dst.datasettype,
30+
json_agg(DISTINCT jsonb_build_object('DatasetType', dst.datasettype,
3131
'DatasetID', ds.datasetid)) AS datasets,
3232
chr.notes AS Notes,
3333
chr.dateprepared AS DatePrepared

0 commit comments

Comments
 (0)