X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 263314763CB for ; Thu, 27 Feb 2003 19:52:30 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 15148-02 for ; Thu, 27 Feb 2003 19:52:19 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id D5B57475FEB for ; Thu, 27 Feb 2003 17:38:42 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h1RMci5u029843; Thu, 27 Feb 2003 17:38:44 -0500 (EST) To: Itai Zukerman Cc: pgsql-sql@postgresql.org Subject: Re: GiST, Not Using Index In-reply-to: <871y1ttoh4.fsf@pip.dynamiclogic.com> References: <87bs0z1zzs.fsf@matt.w80.math-hat.com> <87lm03ghpo.fsf@matt.w80.math-hat.com> <87adghtt0h.fsf_-_@pip.dynamiclogic.com> <27896.1046379102@sss.pgh.pa.us> <871y1ttoh4.fsf@pip.dynamiclogic.com> Comments: In-reply-to Itai Zukerman message dated "Thu, 27 Feb 2003 16:15:03 -0500" Date: Thu, 27 Feb 2003 17:38:43 -0500 Message-ID: <29842.1046385523@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/606 X-Sequence-Number: 12004 Itai Zukerman writes: >> Never leave out the "unimportant" stuff --- that's usually where you >> went wrong ;-) > OK, I've attached below the SQL I use to generate stuff and an > interactive session with the "explain" etc. Ah. Your problem is you need to mark sig_in() as IMMUTABLE, or at least STABLE, for an expression involving sig_in() to be considered safe to index. If it's in C, more than likely it'd best be marked STRICT too (else you'd better have explicit NULL checks in the function code). Don't forget to look at your other custom functions too, to see if they're correctly marked. regards, tom lane