json_object_agg return on no rows

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: json_object_agg return on no rows
Date: 2014-09-24 18:39:35
Message-ID: 54230FE7.8040306@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Probably due to an oversight on my part, json_object_agg currently
returns a json object with no fields rather than NULL, which the docs
say it will, and which would be consistent with all other aggregates
except count().

I don't think we ever discussed this, so it's probably just a slip up.

I'm going to change it to return NULL in this case unless there is some
objection.

cheers

andrew

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-09-24 18:39:38 Re: add modulo (%) operator to pgbench
Previous Message Andres Freund 2014-09-24 18:36:12 Re: better atomics - v0.6