| От | Bruno Wolff III |
|---|---|
| Тема | Re: Index on timestamp to date field |
| Дата | |
| Msg-id | 20031014021030.GA32083@wolff.to обсуждение исходный текст |
| Ответ на | Index on timestamp to date field ("Patrick Hatcher" <PHatcher@macys.com>) |
| Список | pgsql-general |
On Mon, Oct 13, 2003 at 13:49:07 -0700, Patrick Hatcher <PHatcher@macys.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.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера