On Sun, 14 Apr 2024 at 15:14, David Rowley <dgrowle...@gmail.com> wrote: > I had some spare time today, so wrote a patch, which gives you: > > postgres=# explain analyze select * from generate_series('2024-01-01', > '2025-01-01', interval '1 day'); > QUERY PLAN > ------------------------------------------------------------------------------------------------------------------ > Function Scan on generate_series (cost=0.00..3.67 rows=367 width=8) > (actual time=0.258..0.291 rows=367 loops=1)
Here's v2 of the patch with some added regression tests. I did this by writing a plpgsql function named explain_mask_costs() which has various boolean parameters to mask out the various portions of the costs. I wondered if this function should live somewhere else as it seems applicable to more than just misc_functions.sql. Maybe test_setup.sql. I'll leave where it is for now unless anyone thinks differently. This is a fairly simple and seemingly non-controversial patch. I plan to push it in the next few days unless there's some feedback before then. David
v2-0001-Add-support-function-for-generate_series-for-time.patch
Description: Binary data