creating an index on a function

From: "Nick Fankhauser" <nickf(at)ontko(dot)com>
To: "PGSQL-SQL" <pgsql-sql(at)postgresql(dot)org>
Subject: creating an index on a function
Date: 2002-02-15 14:26:25
Message-ID: NEBBLAAHGLEEPCGOBHDGIELDEFAA.nickf@ontko.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)ontko(dot)com Phone 1.765.935.4283 Fax 1.765.962.9788
Ray Ontko & Co. Software Consulting Services http://www.ontko.com/

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Brent Verner 2002-02-15 15:42:52 Re: creating an index on a function
Previous Message Christopher Kings-Lynne 2002-02-15 04:06:11 Re: Index not being used