On hive-staging.pl postgres logs
2024-11-27 18:23:30 UTC [38958]: app=PostgREST 12.0.2 ERROR: 21000: more than one row returned by a subquery used as an expression
2024-11-27 18:23:30 UTC [38958]: app=PostgREST 12.0.2 CONTEXT: PL/pgSQL assignment "_result = jsonb_agg(
(SELECT ha.name FROM hivemind_app.hive_accounts ha JOIN hivemind_app.hive_feed_cache hfc ON ha.id = hfc.account_id WHERE hfc.post_id = _post_id AND hfc.account_id <> _account_id ORDER BY ha.name)
)"
PL/pgSQL function condenser_api_get_reblogged_by(boolean,jsonb) line 14 at assignment
PL/pgSQL function hivemind_postgrest_utilities.get_condenser_api_method(text,boolean,jsonb) line 9 at assignment
PL/pgSQL function hivemind_postgrest_utilities.dispatch(text,text,boolean,jsonb) line 7 at assignment
PL/pgSQL function home(json) line 18 at RETURN
2024-11-27 18:23:30 UTC [38958]: app=PostgREST 12.0.2 LOCATION: ExecSetParamPlan, nodeSubplan.c:1172
2024-11-27 18:23:30 UTC [38958]: app=PostgREST 12.0.2 STATEMENT: WITH pgrst_source AS (SELECT pgrst_call.pgrst_scalar FROM (SELECT "hivemind_endpoints"."home"($1::json) pgrst_scalar) pgrst_call) SELECT null::bigint AS total_result_set, 1 AS page_total, coalesce(json_agg(_postgrest_t.pgrst_scalar)->0, 'null') AS body, nullif(current_setting('response.headers', true), '') AS response_headers, nullif(current_setting('response.status', true), '') AS response_status, '' AS response_inserted FROM (SELECT "home".* FROM "pgrst_source" AS "home" ) _postgrest_t
This doesn't really seem like an error, since jsonb_agg is able to accept multiple rows. Maybe this is a false positive by postgres...
Edited by Dan Notestein