| From: | jian he <jian(dot)universality(at)gmail(dot)com> |
|---|---|
| To: | Joseph Koshakow <koshy44(at)gmail(dot)com> |
| Cc: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Infinite Interval |
| Date: | 2023-01-09 04:17:24 |
| Message-ID: | CACJufxG61oDFix1ibH_yA+x_KKfbog13CmhJok1BViJymw-s7A@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sun, Jan 8, 2023 at 4:22 AM Joseph Koshakow <koshy44(at)gmail(dot)com> wrote:
> On Sat, Jan 7, 2023 at 3:05 PM Joseph Koshakow <koshy44(at)gmail(dot)com> wrote:
> >
> > On Sat, Jan 7, 2023 at 3:04 PM Joseph Koshakow <koshy44(at)gmail(dot)com>
> wrote:
> > >
> > > I think this patch is just about ready for review, except for the
> > > following two questions:
> > > 1. Should finite checks on intervals only look at months or all three
> > > fields?
> > > 2. Should we make the error messages for adding/subtracting infinite
> > > values more generic or leave them as is?
> > >
> > > My opinions are
> > > 1. We should only look at months.
> > > 2. We should make the errors more generic.
> > >
> > > Anyone else have any thoughts?
>
> Here's a patch with the more generic error messages.
>
> - Joe
>
HI.
I just found out another problem.
select * from generate_series(timestamp'-infinity', timestamp 'infinity',
interval 'infinity');
ERROR: timestamp out of range
select * from generate_series(timestamp'-infinity',timestamp 'infinity',
interval '-infinity'); --return following
generate_series
-----------------
(0 rows)
select * from generate_series(timestamp 'infinity',timestamp 'infinity',
interval 'infinity');
--will run all the time.
select * from generate_series(timestamp 'infinity',timestamp 'infinity',
interval '-infinity');
ERROR: timestamp out of range
select * from generate_series(timestamp'-infinity',timestamp'-infinity',
interval 'infinity');
ERROR: timestamp out of range
select * from generate_series(timestamp'-infinity',timestamp'-infinity',
interval '-infinity');
--will run all the time.
--
I recommend David Deutsch's <<The Beginning of Infinity>>
Jian
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrey Borodin | 2023-01-09 04:19:14 | Re: MultiXact\SLRU buffers configuration |
| Previous Message | Andrey Borodin | 2023-01-09 04:08:05 | Re: Amcheck verification of GiST and GIN |