When using supabase on their infrastructure, we enable it by using this sql.
ALTER ROLE authenticator SET pgrst.db_aggregates_enabled = 'true';
NOTIFY pgrst, 'reload config';
but I think it's different when we enable it on self_hosted. Cause when I try that, aggregate function still cannot be called.