Received: from shire.ontko.com (shire.ontko.com [199.164.165.1]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g1FEUXE71981 for ; Fri, 15 Feb 2002 09:30:33 -0500 (EST) (envelope-from nickf@ontko.com) Received: from nick (bilbo.ontko.com [199.164.165.101]) by shire.ontko.com (8.9.3/8.9.3/Debian 8.9.3-21) with SMTP id JAA31018 for ; Fri, 15 Feb 2002 09:30:37 -0500 X-Authentication-Warning: shire.ontko.com: Host bilbo.ontko.com [199.164.165.101] claimed to be nick Reply-To: From: "Nick Fankhauser" To: "PGSQL-SQL" Subject: creating an index on a function Date: Fri, 15 Feb 2002 09:26:25 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Importance: Normal X-Archive-Number: 200202/173 X-Sequence-Number: 6599 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/