Received: from ece.rice.edu (ece.rice.edu [128.42.4.34]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fA8K0sm18494 for ; Thu, 8 Nov 2001 15:00:54 -0500 (EST) (envelope-from reedstrm@rice.edu) Received: from localhost (localhost [127.0.0.1]) by ece.rice.edu (Postfix) with ESMTP id ECFB468A5C; Thu, 8 Nov 2001 14:00:52 -0600 (CST) Received: from wallace.ece.rice.edu (wallace.ece.rice.edu [128.42.12.154]) by ece.rice.edu (Postfix) with ESMTP id 4AAA568A57; Thu, 8 Nov 2001 14:00:52 -0600 (CST) Received: from reedstrm by wallace.ece.rice.edu with local (Exim 3.22 #1 (Debian)) id 161vM4-0003B1-00; Thu, 08 Nov 2001 14:00:52 -0600 Date: Thu, 8 Nov 2001 14:00:52 -0600 From: "Ross J. Reedstrom" To: Claus Heiko Niesen Cc: Josh Berkus , pgsql-sql@postgresql.org Subject: Re: Can this query be optimized? Message-ID: <20011108140051.B11680@rice.edu> Mail-Followup-To: "Ross J. Reedstrom" , Claus Heiko Niesen , Josh Berkus , pgsql-sql@postgresql.org References: <16760.1005229805@sss.pgh.pa.us> <5.1.0.14.2.20011108122508.00ae2350@pop.gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.1.0.14.2.20011108122508.00ae2350@pop.gmx.net> User-Agent: Mutt/1.3.18i X-Virus-Scanned: by AMaViS snapshot-20010714 X-Archive-Number: 200111/136 X-Sequence-Number: 5520 On Thu, Nov 08, 2001 at 01:19:25PM -0600, Claus Heiko Niesen wrote: > At 10:49 AM 11/08/2001, Josh wrote: > > I just tried to build an index to see what the explain path would do but I > get an error on the word extract: > > # create index week_pics_month_key on week_pics (extract(year from > time_stamp), extract(month from time_stamp)); > ERROR: parser: parse error at or near "extract" It's erroring on the second use of extract(). You can have multicolumn indices, or you can have functional indices. You can't have a multifunctional index (right now. I have'nt looked at the code to see why.) Ross