| From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
|---|---|
| To: | Patrick Hatcher <PHatcher(at)macys(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Index on timestamp to date field |
| Date: | 2003-10-14 02:10:30 |
| Message-ID: | 20031014021030.GA32083@wolff.to |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Mon, Oct 13, 2003 at 13:49:07 -0700,
Patrick Hatcher <PHatcher(at)macys(dot)com> wrote:
> 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
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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Marc G. Fournier | 2003-10-14 02:14:11 | Re: gborg cvs ? |
| Previous Message | D. Stimits | 2003-10-14 01:48:38 | Re: [INTERFACES] more on undefined reference to 'pg_detoast_datum' |