From: | Glen Eustace <geustace(at)godzone(dot)net(dot)nz> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Inconsistent values for 'now' |
Date: | 2005-04-01 05:07:50 |
Message-ID: | 1112332070.5577.46.camel@agree-6 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> Offhand I'd expect the 'now' to be reduced to a timestamp constant
> at the time the view is created.
Hmmm, my assumption had been that the 'now' constant would be evaluated
everytime the underlying SELECT was build by the planner.
> although personally I'd not feel very comfortable with the idea of a
> view whose contents change over time even when you weren't actually
> doing anything to the database. Maybe you should rethink this idea
> altogether...
This technique was one that was recommended to me by an experienced DBA.
Apparently, he and others use it a lot.
Using the function now() rather than the literal 'now' works as
expected. Thanks.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Glen and Rosanne Eustace,
GodZone Internet Services, a division of AGRE Enterprises Ltd.,
P.O. Box 8020, Palmerston North, New Zealand 5301
Ph/Fax: +64 6 357 8168, Mob: +64 27 5 424 015, Web: www.godzone.net.nz
"A Ministry specialising in providing low-cost professional Internet
Services to NZ Christian Churches, Ministries and Organisations"
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2005-04-01 06:19:36 | Re: SELECT INTO Array? |
Previous Message | Tom Lane | 2005-04-01 04:40:49 | Re: Inconsistent values for 'now' |