X-Original-To: pgsql-novice-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id CC88BD1B520 for ; Wed, 22 Oct 2003 19:18:33 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 70115-08 for ; Wed, 22 Oct 2003 16:18:02 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id DA65ED1B525 for ; Wed, 22 Oct 2003 16:18:00 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id h9MJHwit018110; Wed, 22 Oct 2003 15:17:58 -0400 (EDT) To: Michael Glaesmann Cc: pgsql-novice@postgresql.org Subject: Re: Functional index problems. (Was: Many joins: monthly summaries S-L--O--W) In-reply-to: <7141E2A2-04BE-11D8-81AE-0005029FC1A7@myrealbox.com> References: <7141E2A2-04BE-11D8-81AE-0005029FC1A7@myrealbox.com> Comments: In-reply-to Michael Glaesmann message dated "Thu, 23 Oct 2003 03:34:59 +0900" Date: Wed, 22 Oct 2003 15:17:58 -0400 Message-ID: <18109.1066850278@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/188 X-Sequence-Number: 8625 Michael Glaesmann writes: > On Thursday, Oct 23, 2003, at 02:44 Asia/Tokyo, Tom Lane wrote: >> 7.4 is more flexible though --- it will take the above as long as you >> put an extra set of parentheses in there... > I took a gander at the documentation for 7.4beta. I can tell it's been > reorganized. There's no longer a specific section on functional indexes > that I can see, though there is mention of it in the SQL CREATE INDEX > entry > > The 7.3.2 documents I have say that there cannot be multicolumn > functional indexes, though there's no mention of this in the new > documentation. Does this mean this proscription has been lifted? Yes. Any column of an index can now be an expression; the former functional-index capability is now just a special case of "expressional indexes". For syntactic reasons we had to require an extra pair of parens around expressions in the CREATE INDEX statement --- although it proved possible to not require these when the expression looks like a standard-syntax function call, thus providing backwards compatibility with the old functional-index syntax. See http://developer.postgresql.org/docs/postgres/indexes-expressional.html as well as the CREATE INDEX reference page. I'm not particularly happy with the phrase "expressional index", and would like to think of something else to use before the 7.4 docs go final. Any ideas? regards, tom lane