On 12/17/18 5:37 PM, Simon Riggs wrote:
> postgres=# select 'infinity'::timestamp = 'infinity'::timestamp;
> ?column?
> ----------
> t
I'm not persuaded that's a good idea, and would prefer to see an
is_infinite() predicate, and an = operator that complains. But if
the above is current behavior, I wouldn't say I feel strongly enough
to want to change it.
> postgres=# select 'infinity'::timestamp - 'infinity'::timestamp;
>
> would be zero rather than an error, for least surprise.
Here, though, I really think an error is appropriate. Getting a
definite finite result from two operands that really mean "I am
huge but otherwise unknown" seems very surprising to me.
-Chap