Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id QAA56428 for ; Tue, 14 Sep 1999 16:30:27 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id QAA17277; Tue, 14 Sep 1999 16:29:20 -0400 (EDT) To: jens@jens.de cc: pgsql-sql@postgreSQL.org Subject: Re: [SQL] reliable way to crash postgres :) In-reply-to: Your message of Tue, 14 Sep 1999 08:00:57 +0000 (CEST) Date: Tue, 14 Sep 1999 16:29:20 -0400 Message-ID: <17275.937340960@sss.pgh.pa.us> From: Tom Lane Jens Glaser writes: > select * from pg_attribute where (case when 1=1 then > (attname='testname') else (0=1) end); This is fixed in current sources, but for some reason it didn't get back-patched into REL6_5. Done now. Here's the patch if you're in a hurry. *** backend/optimizer/path/indxpath.c.orig Sat Jun 19 00:54:14 1999 --- backend/optimizer/path/indxpath.c Tue Sep 14 16:26:02 1999 *************** *** 585,596 **** Oid restrict_op = InvalidOid; bool isIndexable = false; ! if (or_clause((Node *) clause) || ! not_clause((Node *) clause) || single_node((Node *) clause)) ! return (RestrictInfo *) NULL; ! leftop = get_leftop(clause); rightop = get_rightop(clause); /* * If this is not a join clause, check for clauses of the form: --- 585,597 ---- Oid restrict_op = InvalidOid; bool isIndexable = false; ! /* Clause must be a binary opclause. */ ! if (! is_opclause((Node *) clause)) ! return NULL; leftop = get_leftop(clause); rightop = get_rightop(clause); + if (! leftop || ! rightop) + return NULL; /* * If this is not a join clause, check for clauses of the form: regards, tom lane