Re: [PATCH] Generate random dates/times in a specified range
От | Robert Treat |
---|---|
Тема | Re: [PATCH] Generate random dates/times in a specified range |
Дата | |
Msg-id | CABV9wwPE6K2Duhc0VVXXCt8PSfzJuHJKdGxZTUkb-FPnVcGm4Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [PATCH] Generate random dates/times in a specified range (Dean Rasheed <dean.a.rasheed@gmail.com>) |
Ответы |
Re: [PATCH] Generate random dates/times in a specified range
|
Список | pgsql-hackers |
On Mon, Jul 14, 2025 at 3:21 AM Dean Rasheed <dean.a.rasheed@gmail.com> wrote: > 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? > I feel like this is a very similar argument against what was ultimately the addition of timestamp based generate_series functions, and similarly I think adding these in would be a rather useful improvement for users, though like generate_series, we don't need to hit every different data type (no one should ever generate a random timetz for instance). Robert Treat https://xzilla.net
В списке pgsql-hackers по дате отправления: