From: Tom Lane <tgl@sss.pgh.pa.us>
To: Litao Wu <litaowu@yahoo.com>
Cc: Matthew T. O'Connor <matthew@zeut.net>
Cc: Harmon S. Nine <hnine@netarx.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Timestamp-based indexing
Date: Mon, 26 Jul 2004 17:40:07 -0400
Message-ID: <10061.1090878007@sss.pgh.pa.us> (raw)
In-Reply-To: <20040726212636.5563.qmail@web13125.mail.yahoo.com>
References: <20040726212636.5563.qmail@web13125.mail.yahoo.com>
Litao Wu <litaowu@yahoo.com> writes:
> How about changing:
> CURRENT_TIMESTAMP - INTERVAL '10 minutes'
> to
> 'now'::timestamptz - INTERVAL '10 minutes'
> It seems to me that Postgres will treat it as
> a constant.
Yeah, that works too, though again it might burn you if used inside a
function or prepared statement. What you're doing here is to push the
freezing of the "now" value even further upstream, namely to initial
parsing of the command.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, litaowu@yahoo.com, matthew@zeut.net, hnine@netarx.com
Subject: Re: Timestamp-based indexing
In-Reply-To: <10061.1090878007@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox