Re: SupportRequestRows support function for generate_series_timestamptz

jian he <jian.universality@gmail.com>

From: jian he <jian.universality@gmail.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2024-07-08T02:50:02Z
Lists: pgsql-hackers
looks good to me.

some minor questions:
/*
* Protect against overflows in timestamp_mi.  XXX convert to
* ereturn one day?
*/
if (!TIMESTAMP_NOT_FINITE(start) && !TIMESTAMP_NOT_FINITE(finish) &&
!pg_sub_s64_overflow(finish, start, &dummy))

i don't understand the comment "XXX convert to ereturn one day?".

do we need to add unlikely for "pg_sub_s64_overflow", i saw most of
pg_sub_s64_overflow have unlikely.



Commits

  1. Teach planner how to estimate rows for timestamp generate_series