pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Brian Hirt <bhirt@mobygames.com>
Cc: 'Postgresql Performance' <pgsql-performance@postgresql.org>
Subject: Re: query with timestamp not using index
Date: Wed, 01 Dec 2004 15:06:58 -0500
Message-ID: <18427.1101931618@sss.pgh.pa.us> (raw)
In-Reply-To: <95241C28-43B8-11D9-AD0F-000D93AD2E74@mobygames.com>
References: <95241C28-43B8-11D9-AD0F-000D93AD2E74@mobygames.com>

Brian Hirt <bhirt@mobygames.com> writes:
> select count(*) from redir_log
> where redir_timestamp >= '10/14/2004'::timestamp without time zone at time zone 'GMT';

That seems like the hard way to express a timestamp constant.  Why not

select count(*) from redir_log
where redir_timestamp >= '10/14/2004 00:00 GMT';

(FWIW, though, the AT TIME ZONE construct *should* have been collapsed
to a constant; 8.0 fixes this.)

			regards, tom lane



view thread (5+ messages)  latest in thread

Message-ID: <18427.1101931618@sss.pgh.pa.us>
Permalink:  ../18427.1101931618@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18427.1101931618@sss.pgh.pa.us

 · 

reply

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, bhirt@mobygames.com
  Subject: Re: query with timestamp not using index
  In-Reply-To: <18427.1101931618@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