I have a table with a tsrange field and I use the follow query to figure 
out if something falls on today:

select * from burritotrucks where onsite @> '2013-11-15'::timestamp

When I run a basic fetch command it works great:
@eating = DB.fetch("select * from burritotrucks where onsite @> 
'2013-11-15'::timestamp").all

when I run it with the pg_range operators:
@eating = DB[:burritotrucks].where(:onsite.pg_range.contains('2013-11-15'))
or
@eating = DB[:burritotrucks].where(:onsite.pg_range.contains(Date.today))

it doesn't understand that the passed in value is supposed to be a 
timestamp and not a date - thus throwing errors on the min/max boundaries.

Any thoughts on how get it to understand that it's a timestamp?

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to