Re: SupportRequestRows support function for generate_series_timestamptz - Mailing list pgsql-hackers

From David Rowley
Subject Re: SupportRequestRows support function for generate_series_timestamptz
Date
Msg-id CAApHDvois4b9Mf7+wHffQC+7XzoV9QVF6g5-WxVkYzHYivPR1g@mail.gmail.com
Whole thread Raw
In response to [MASSMAIL]SupportRequestRows support function for generate_series_timestamptz  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: SupportRequestRows support function for generate_series_timestamptz
List pgsql-hackers
On Sun, 14 Apr 2024 at 15:14, David Rowley <dgrowleyml@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

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows
Next
From: Nathan Bossart
Date:
Subject: Re: pg_maintain and USAGE privilege on schema