I have multiple database servers I'm querying with a query that compares an expiration column with
now(). The problem is that one of the servers' expiration column is a
timestamp with time zone, and all the rest are simply
date. I can't change this because I don't have admin access, and in fact I'm only querying the view. Postgres is fairly new to me, so I don't really understand how the dates and times work with each other.
When I try and query the server with
timestamp with time zone by casting the
timestamp as a
... WHERE ( status_code = '30000' OR status_code = '30005' ) AND CAST(expiration AS DATE) > now()
It works, but using the same query on the servers where
expiration is already a
[Err] ERROR: invalid input syntax for type date: "No End Date"
Any help would be appreciated, I'd really rather not hard code an exception for this one DB server.