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 behavior is better than the other. We > might just be replacing one surprising behavior with another. Well, this code path is not much except a punt. If we're going to touch it we should think through the behavior for all field types, not just epoch. I think a reasonable case could be made for throwing error or returning NaN (indicating "indeterminate") for most field types. I can see returning +/- infinity for epoch --- are there any others where that's sane? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers