Thread: Passing infinity as a timestamp value in Ruby

Passing infinity as a timestamp value in Ruby

From
"James B. Byrne"
Date:
I have run into a situation in Ruby on Rails-3.0.5 wherein the
framework attempts to set unreferenced columns to their default
values as extracted from the DBMS.  However, it cannot handle
infinity as a datetime class, which evidently is what AR maps
timestamps to, and so attempts to insert NULL instead.  As there is
a NOT NULL constraint on that column the INSERT always fails.

How would one pass a value of 'infinity' to PostgreSQL in this case.
 Am I constrained to hand craft an SQL INSERT query?

I have raised the issue on the Rails Core list but if a solution to
this problem is known to anyone here then I would like to learn of
it.


--
***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3