Daniele Varrazzo wrote:
Hello,
=# select extract(epoch from 'infinity'::timestamp);
date_part
---
0
A better value would be 'infinity'::float8. Ditto for -infinity.
I'm trying to use a box-based index to represent the intervals in a
table containing a pair of fields
On Jul 13, 2011, at 1:43 PM, Bruce Momjian br...@momjian.us wrote:
Daniele Varrazzo wrote:
Hello,
=# select extract(epoch from 'infinity'::timestamp);
date_part
---
0
A better value would be 'infinity'::float8. Ditto for -infinity.
I'm trying to use a box-based index
Excerpts from Robert Haas's message of mié jul 13 16:13:12 -0400 2011:
On Jul 13, 2011, at 1:43 PM, Bruce Momjian br...@momjian.us wrote:
Daniele Varrazzo wrote:
=# select extract(epoch from 'infinity'::timestamp);
date_part
---
0
A better value would be
On 14 July 2011 06:58, Alvaro Herrera alvhe...@commandprompt.com wrote:
I don't find the proposed behavior all that suprising, which the
original behavior surely is. I guess the bigger question is whether the
values that timestamptz_part() returns for other cases (than epoch)
should also be
It's sort of non-obvious that either behavior is better than the other.
Here's the reason why the existing behavior is wrong:
postgres=# select extract('epoch' from timestamptz 'infinity') = extract
('epoch' from timestamptz '1970-01-01 00:00:00-00');
?column?
--
t
--
Josh Berkus
Robert Haas robertmh...@gmail.com writes:
On Jul 13, 2011, at 1:43 PM, Bruce Momjian br...@momjian.us wrote:
I see:
if (TIMESTAMP_NOT_FINITE(timestamp))
{
result = 0;
PG_RETURN_FLOAT8(result);
}
Does anyone object to changing this?
It's sort of non-obvious that either
On Jul 13, 2011, at 4:21 PM, Brendan Jurd dire...@gmail.com wrote:
On 14 July 2011 06:58, Alvaro Herrera alvhe...@commandprompt.com wrote:
I don't find the proposed behavior all that suprising, which the
original behavior surely is. I guess the bigger question is whether the
values that
On 14 July 2011 08:16, Robert Haas robertmh...@gmail.com wrote:
On Jul 13, 2011, at 4:21 PM, Brendan Jurd dire...@gmail.com wrote:
Well, for example, how do you go about answering the question what is
the day-of-month of the infinite timestamp? The question is
nonsense; it doesn't have a