Passing infinity as a timestamp value in Ruby - Mailing list pgsql-general

From James B. Byrne
Subject Passing infinity as a timestamp value in Ruby
Date
Msg-id 50607.216.185.71.25.1301514527.squirrel@webmail.harte-lyne.ca
Whole thread Raw
List pgsql-general
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


pgsql-general by date:

Previous
From: "David Johnston"
Date:
Subject: Re: revoke permissions - not working as expected
Next
From: Mike Orr
Date:
Subject: pg_restore