Em Sáb, 2009-05-16 às 23:40 -0400, Tom Lane escreveu:
> "Dickson S. Guedes" <listas@guedesoft.net> writes:
> > Is a simple "SELECT generate_series(now(), CAST('infinity'::date AS
> > timestamp), interval '1 hour');" working forever, an expected
> > behavior?
>
> Uh, what were you expecting it to do?
Perhaps, a HINT?
> Actually, I believe it will fail eventually when the repeated additions
> overflow ... in 294277 AD. So you've got about 2 billion timestamp
> additions to wait through.
A customer are porting his application to 8.4, and are using a query
like that. Someone unintentionally included a "infinity" date and that
query have been running until they see the test server memory at 99% and
cpu at 100%.
I suggested him to use LIMIT.
[]s
--
Dickson S. Guedes
mail/xmpp: guedes@guedesoft.net - skype: guediz
http://guedesoft.net - http://www.postgresql.org.br