From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | jens(at)jens(dot)de |
Cc: | pgsql-sql(at)postgreSQL(dot)org |
Subject: | Re: [SQL] reliable way to crash postgres :) |
Date: | 1999-09-14 20:29:20 |
Message-ID: | 17275.937340960@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Jens Glaser <jens(at)helena(dot)jens(dot)de> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Clayton Cottingham | 1999-09-14 21:53:37 | to do's? |
Previous Message | raptor | 1999-09-14 18:45:36 | Long story !!! Please HELP !!! |