change in now() and ago with 7.x

From: David Stokes <dave(at)greatgeek(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: change in now() and ago with 7.x
Date: 2000-07-05 17:51:00
Message-ID: 396375BD.C87EEEB7@greatgeek.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Pre-7.x, we used to use a line like: " request.date_submitted > (now()
+ '24 hours ago')"
to pull data created in the past day (used against a timestamp).
Something changed with 7.x that blows that line out.

I am looking for a work around for use with 7.x. Currently I'm using
"select now()::DATETIME - '24 hours'::TIMESPAN" and using the return as
a variable to test against -- too much code. I'd rather just fix the
one line rather than hack all the existing scripts.

So what suggestions do you have and could you point me to what changed
between 6.x and 7.x that broke my scripts (I've got to tell the boss
something :-) )

Thanks!

Dave Stokes

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2000-07-05 18:12:37 Re: lztext and compression ratios...
Previous Message Peter Mittermayer 2000-07-05 17:45:44 psotgresql history function