Index on timestamp to date field

From: "Patrick Hatcher" <PHatcher(at)macys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Index on timestamp to date field
Date: 2003-10-13 20:49:07
Message-ID: OFF4DD9C81.1DB45A63-ON88256DBE.00713BDB-88256DBE.00730621@fds.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a timestamp field where I find I'm doing a lot of searching by date
(YYYY-MM-DD) or using this field as a match to another table that has a
date format. I wanted to create an index on the timestamp field using a
date format. Is this possible? I tried:
CREATE INDEX test_2 ON table1 USING btree to_char(field2, 'MM-DD-YYYY');
but I get an error message error at or new to_char

TIA

Patrick Hatcher
Macys.Com
Legacy Integration Developer
415-422-1610 office
HatcherPT - AIM

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2003-10-13 21:10:25 Pgsql on Windows
Previous Message Sean Chittenden 2003-10-13 20:42:11 Re: Temporary tables and miscellaneous schemas