Re: Query generates infinite loop

2022-05-10 Thread Tom Lane
Corey Huinker writes: >> Less sure about that. ISTM the reason that the previous proposal failed >> was that it introduced too much ambiguity about how to resolve >> unknown-type arguments. Wouldn't the same problems arise here? > By adding a different function, there is no prior behavior to

Re: Query generates infinite loop

2022-05-10 Thread Corey Huinker
> > Less sure about that. ISTM the reason that the previous proposal failed > was that it introduced too much ambiguity about how to resolve > unknown-type arguments. Wouldn't the same problems arise here? > If I recall, the problem was that the lack of a date-specific generate_series function

Re: Query generates infinite loop

2022-05-09 Thread Tom Lane
Corey Huinker writes: > The infinite-upper-bound-withlimit-pushdown counterexample makes sense, but > seems like we're using generate_series() only because we lack a function > that generates a series of N elements, without a specified upper bound, > something like > generate_finite_series(

Re: Query generates infinite loop

2022-05-09 Thread Corey Huinker
On Mon, May 9, 2022 at 12:02 AM Tom Lane wrote: > Corey Huinker writes: > > On Wed, May 4, 2022 at 3:01 PM Jeff Janes wrote: > >> On Wed, Apr 20, 2022 at 5:43 PM Tom Lane wrote: > >>> Oh --- looks like numeric generate_series() already throws error for > >>> this, so we should just make the

Re: Query generates infinite loop

2022-05-08 Thread Tom Lane
Corey Huinker writes: > On Wed, May 4, 2022 at 3:01 PM Jeff Janes wrote: >> On Wed, Apr 20, 2022 at 5:43 PM Tom Lane wrote: >>> Oh --- looks like numeric generate_series() already throws error for >>> this, so we should just make the timestamp variants do the same. > This came up once before >

Re: Query generates infinite loop

2022-05-08 Thread Corey Huinker
On Wed, May 4, 2022 at 3:01 PM Jeff Janes wrote: > On Wed, Apr 20, 2022 at 5:43 PM Tom Lane wrote: > >> I wrote: >> > it's true that infinities as generate_series endpoints are going >> > to work pretty oddly, so I agree with the idea of forbidding 'em. >> >> > Numeric has infinity as of late,

Re: Query generates infinite loop

2022-05-04 Thread Tom Lane
Jeff Janes writes: > The regression test you added for this change causes an infinite loop when > run against an unpatched server with --install-check. That is a bit > unpleasant. Is there something we can and should do about that? I was > expecting regression test failures of course but not

Re: Query generates infinite loop

2022-05-04 Thread Jeff Janes
On Wed, Apr 20, 2022 at 5:43 PM Tom Lane wrote: > I wrote: > > it's true that infinities as generate_series endpoints are going > > to work pretty oddly, so I agree with the idea of forbidding 'em. > > > Numeric has infinity as of late, so the numeric variant would > > need to do this too. > >