Create Index on Date portion of timestamp

From: "Niederland" <niederland(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Create Index on Date portion of timestamp
Date: 2006-10-13 01:40:22
Message-ID: 1160703622.606365.154150@m7g2000cwm.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am using postgresql 8.1.4.

Is there anyway to create an index equivalent to:
CREATE INDEX i1 ON t1 USING btree (ts::Date);

So that indexes are used for queries when the field is cast to a date.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christopher Browne 2006-10-13 03:15:58 Re: more anti-postgresql FUD
Previous Message Alexander Staubo 2006-10-13 00:01:38 Re: Storing images in PostgreSQL databases (again)