Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E973C4758FE for ; Sun, 22 Dec 2002 05:20:32 -0500 (EST) Received: from acheron.rime.com.au (unknown [203.208.66.49]) by postgresql.org (Postfix) with ESMTP id 31CA34758DC for ; Sun, 22 Dec 2002 05:20:32 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by acheron.rime.com.au (Postfix on SuSE Linux 8.0 (i386)) with ESMTP id A48E25457F; Sun, 22 Dec 2002 21:20:32 +1100 (EST) Received: by acheron.rime.com.au (Postfix on SuSE Linux 8.0 (i386), from userid 527) id 269EF54580; Sun, 22 Dec 2002 21:20:31 +1100 (EST) Received: from hephaestus.rhyme.com.au (unknown [203.8.195.124]) by acheron.rime.com.au (Postfix on SuSE Linux 8.0 (i386)) with ESMTP id EF7B95457F; Sun, 22 Dec 2002 21:20:28 +1100 (EST) Message-Id: <5.1.0.14.0.20021222211601.04f26150@mail.rhyme.com.au> X-Sender: pjw@mail.rhyme.com.au X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sun, 22 Dec 2002 21:18:22 +1100 To: Tom Lane , wweng@kencast.com From: Philip Warner Subject: Re: create index on function - why? Cc: pgsql-sql@postgresql.org In-Reply-To: <14409.1013791606@sss.pgh.pa.us> References: <3C6D3684.9040101@kencast.com> <3C6D3684.9040101@kencast.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam-Status: No, hits=-3.2 required=8.5 tests=IN_REP_TO,SUBJ_ENDS_IN_Q_MARK,WEIRD_PORT version=2.31 X-Spam-Level: X-Virus-Scanned: by AMaViS 0.3.12pre8 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/255 X-Sequence-Number: 10843 At 11:46 AM 15/02/2002 -0500, Tom Lane wrote: >A functional index is sort of like a hidden, precomputed column added to >your table. One of the things I keep running into is the desire for a mixed functional/data index. I know the workaround is to build a function that combines all fields, but would it be hard to allow mixed indexes: create table users(id integer, last_name text); create index users_id_name on users(id,lower(name)); ? ---------------------------------------------------------------- Philip Warner | __---_____ Albatross Consulting Pty. Ltd. |----/ - \ (A.B.N. 75 008 659 498) | /(@) ______---_ Tel: (+61) 0500 83 82 81 | _________ \ Fax: (+61) 03 5330 3172 | ___________ | Http://www.rhyme.com.au | / \| | --________-- PGP key available upon request, | / and from pgp5.ai.mit.edu:11371 |/