creating an index on a function

Поиск
Список
Период
Сортировка
От Nick Fankhauser
Тема creating an index on a function
Дата
Msg-id NEBBLAAHGLEEPCGOBHDGIELDEFAA.nickf@ontko.com
обсуждение исходный текст
Ответы Re: creating an index on a function  (Brent Verner <brent@rcfile.org>)
Re: creating an index on a function  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
Good Morning everyone!

I just tried to create an index on a function with no success. My syntax
seems to match the syntax shown in the docs for Create Index, but I get an
error. Any thoughts would be appreciated. Here is my attempt-

First, I did a select to make sure I had the function syntax correct, and
then tried to create the index:


staging=# select count(*) from event where
date_trunc('day',event_date_time)='07/27/2001';count
-------   27
(1 row)

staging=#
staging=# create index event_day on
event(date_trunc('day',event_date_time));
ERROR:  parser: parse error at or near "'"

Thanks!

-Nick

--------------------------------------------------------------------------
Nick Fankhauser  nickf@ontko.com  Phone 1.765.935.4283  Fax 1.765.962.9788
Ray Ontko & Co.     Software Consulting Services     http://www.ontko.com/



В списке pgsql-sql по дате отправления:

Предыдущее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Re: Index not being used
Следующее
От: Brent Verner
Дата:
Сообщение: Re: creating an index on a function