> -----Original Message----- > From: pgsql-general-owner@xxxxxxxxxxxxxx [mailto:pgsql-general- > owner@xxxxxxxxxxxxxx] On Behalf Of Alban Hertroys > Sent: Monday, July 16, 2012 1:44 PM > To: Daniele Varrazzo > Cc: Craig Ringer; Chris Bartlett; pgsql-general@xxxxxxxxxxxxxx > Subject: Re: Can't figure out how to use now() in default for > tsrange column (PG 9.2) > That said, if it were up to me to decide what the proper epoch value would > be for infinity, I'd say NULL - it is unknown as computers simply can't count > far enough. It's probably only a matter of time until someone thinks of a > solution for that though. > Given: A) extract() returns a "double precision" B) "... In addition to ordinary numeric values, the floating-point types have several special values: ... 'Infinity ..." I would vote that the epoch result should be "Infinity". Specific, but unknown (e.g., day of week, month, year, etc...) results could return "NaN" though "NULL" is also, probably more, reasonable given the context. The goal would be to use "Infinity" in case where "<>" comparisons are common and use "NULL" where "=" comparisons are common. Personally I'd prefer to generate an error in places where "NULL" would be the result in order to minimize bugs. David J. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general