Query generates infinite loop - Mailing list pgsql-bugs

From Richard Wesley
Subject Query generates infinite loop
Date
Msg-id 91B44E7B-68D5-448F-95C8-B4B3B0F5DEAF@duckdblabs.com
Whole thread Raw
Responses Re: Query generates infinite loop  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-bugs
Hi All -

I was implementing the infinity time constants in DuckDB when I ran into an infinite loop. It seems that PG has the same problem for the same reason (adding an interval to an infinite timestamp produces the same timestamp, so the increment operation never goes anywhere.)  Here is the query:
  1. select COUNT(*) 
    FROM generate_series('-infinity'::TIMESTAMP, 'epoch'::TIMESTAMP, INTERVAL '1 DAY');

This seems like a DoS great attack, so we are disallowing infinities as bounds for both table and scalar series generation. As an upper bound, it eventually gives an error, so it seems  there is not much utility anyway.


Met vriendelijke groet, best regards, mit freundlichen Grüßen,

Richard Wesley
Group-By Therapist
richard@duckdblabs.com





pgsql-bugs by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: Help Me! ^^ "must be superuser to make network requests"
Next
From: Peter Eisentraut
Date:
Subject: Re: BUG #17466: Is it possible to supplement the default compilation options of CFLAGS in configure file?