X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BF51132A11D for ; Wed, 29 Sep 2004 06:31:25 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88406-06 for ; Wed, 29 Sep 2004 05:31:05 +0000 (GMT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 549D732A183 for ; Wed, 29 Sep 2004 06:31:03 +0100 (BST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id C7B7235691; Tue, 28 Sep 2004 22:30:55 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id C64D435689; Tue, 28 Sep 2004 22:30:55 -0700 (PDT) Date: Tue, 28 Sep 2004 22:30:55 -0700 (PDT) From: Stephan Szabo To: "Thomas F.O'Connell" Cc: General Subject: Re: Indexes on Expressions -- Parentheses In-Reply-To: Message-ID: <20040928222637.L43334@megazone.bigpanda.com> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/1219 X-Sequence-Number: 66425 sszabo@bigpanda.com On Tue, 28 Sep 2004, Thomas F.O'Connell wrote: > From 11.5 in the docs: > > "The syntax of the CREATE INDEX command normally requires writing > parentheses around index expressions, as shown in the second example. > The parentheses may be omitted when the expression is just a function > call, as in the first example." > > But when I try this: > > db=# CREATE INDEX expression_idx on some_table( extract( year from > some_column ) ); Extract(year from some_column) is not really just a function call it's an expression that looks similar to a function call because that's how SQL defined it.