[HACKERS] proposal: custom autovacuum entries

2017-10-26 Thread Jordan Deitch
Hi hackers,

I would like to remove records from a time series table older than a
certain age. My understanding of current standard practice is to configure
an external scheduler like cron to perform the deletion.
My proposal is to allow clients to register functions on the tail end of
the autovacuum sequence.
Alternatively I would suggest some mechanism for scheduling within
PostgreSQL


Thanks,
Jordan Deitch


Re: [HACKERS] json_agg produces nonstandard json

2017-05-04 Thread Jordan Deitch
Thank you for responding!

Good points.

However, I don't see consistency between the results of these two
statements:

select jsonb_agg((select 1 where false));
select sum((select 1 where false));

Therefore another option I would like to suggest is returning the same null
value-types for the sum() and json_agg().

So the select jsonb_agg((select 1 where false)); would return null as
opposed to [null]. In this case it would be compatible with coalesce()

---
Thanks
Jordan Deitch


[HACKERS] json_agg produces nonstandard json

2017-05-04 Thread Jordan Deitch
Hello!

I apologize in advanced if this has been previously discussed;

A json(b)_agg() will produce the following result when no results are
passed in:

"[null]"

per:

select jsonb_agg((select 1 where false));

I believe, generally speaking, '[]' would be the more appropriate output.

Would postgres welcome a patch to handle the empty case of json(b)_agg?

Thanks!

---
Jordan Deitch