Re: [PATCH] Generate random dates/times in a specified range

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема Re: [PATCH] Generate random dates/times in a specified range
Дата
Msg-id CAEZATCU+Q6uz8RPck9WEWAOwNsNrEv_LQtx2Gqz83ghJ4dG7Sg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Generate random dates/times in a specified range  (Greg Sabino Mullane <htamfids@gmail.com>)
Список pgsql-hackers
On Sat, 12 Jul 2025 at 16:15, Greg Sabino Mullane <htamfids@gmail.com> wrote:
>
> I like the idea, especially the date variant. Unlike Tom, I'm not particularly concerned about breakage of existing
scripts,as
 
> most already are working just fine with raw numbers and I don't see this patch breaking them.
>
> In a selfish vein, I would use the "date" and timestamp variants a lot. I would use the "time" ones seldom to never.

But it's completely trivial to emulate random(min_date, max_date), just by doing

  min_date + random(0, max_date - min_date)

Is it really worth adding a core function for that?

Regards,
Dean



В списке pgsql-hackers по дате отправления: