[HACKERS] json function volatility

2014-10-17 Thread Andrew Dunstan
Following up something Pavel wrote, I notice that json_agg() and json_object_agg() are both marked as immutable, even though they invoke IO functions, while json_object is marked stable, even though it does not, and can probably be marked as immutable. Mea maxima culpa. I'm not sure what we

Re: [HACKERS] json function volatility

2014-10-17 Thread Merlin Moncure
On Fri, Oct 17, 2014 at 3:03 PM, Andrew Dunstan and...@dunslane.net wrote: Following up something Pavel wrote, I notice that json_agg() and json_object_agg() are both marked as immutable, even though they invoke IO functions, while json_object is marked stable, even though it does not, and can

Re: [HACKERS] json function volatility

2014-10-17 Thread Peter Geoghegan
On Fri, Oct 17, 2014 at 1:44 PM, Merlin Moncure mmonc...@gmail.com wrote: Is it too late to change them? Either way, it seems fairly implausible someone would come up with a case to stick json_agg(), or any aggregate function really, inside of an index. So it's not exactly the crime of the

Re: [HACKERS] json function volatility

2014-10-17 Thread Alvaro Herrera
Merlin Moncure wrote: On Fri, Oct 17, 2014 at 3:03 PM, Andrew Dunstan and...@dunslane.net wrote: Following up something Pavel wrote, I notice that json_agg() and json_object_agg() are both marked as immutable, even though they invoke IO functions, while json_object is marked stable, even

Re: [HACKERS] json function volatility

2014-10-17 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Merlin Moncure wrote: On Fri, Oct 17, 2014 at 3:03 PM, Andrew Dunstan and...@dunslane.net wrote: Following up something Pavel wrote, I notice that json_agg() and json_object_agg() are both marked as immutable, even though they invoke IO