Re: [GENERAL] Index on timestamp to date field

2003-10-13 Thread Bruno Wolff III
On Mon, Oct 13, 2003 at 13:49:07 -0700,
  Patrick Hatcher <[EMAIL PROTECTED]> wrote:
> I have a timestamp field where I find I'm doing a lot of searching by date
> (-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-');
> but I get an error message error at or new to_char

You can't create general functional indexes until 7.4.
However you might be able to use an index on the timestamp if you cast
the character strings to a timestamp value.

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


[GENERAL] Index on timestamp to date field

2003-10-13 Thread Patrick Hatcher
I have a timestamp field where I find I'm doing a lot of searching by date
(-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-');
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


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html