pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: jens@jens.de
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] reliable way to crash postgres :)
Date: Tue, 14 Sep 1999 16:29:20 -0400
Message-ID: <17275.937340960@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.05.9909140800080.356-100000@helena.jens.de>

Jens Glaser <jens@helena.jens.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.

inline patch 1: backend/optimizer/path/indxpath.c (+5/-4 lines) download inline-1.patch*** 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

view thread (2+ messages)

Message-ID: <17275.937340960@sss.pgh.pa.us>
Permalink:  ../17275.937340960@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17275.937340960@sss.pgh.pa.us

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jens@jens.de
  Subject: Re: [SQL] reliable way to crash postgres :)
  In-Reply-To: <17275.937340960@sss.pgh.pa.us>
  References: <Pine.LNX.4.05.9909140800080.356-100000@helena.jens.de> <17275.937340960@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox