Re: Postgresql crash (signal 11). keywords: distinct, subselect, union

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Magnus Naeslund(f)" <mag(at)fbab(dot)net>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Postgresql crash (signal 11). keywords: distinct, subselect, union
Date: 2006-02-13 14:42:05
Message-ID: 28358.1139841725@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Magnus Naeslund(f)" <mag(at)fbab(dot)net> writes:
> SELECT DISTINCT
> *
> FROM
> (
> SELECT
> vtgm.snicker_id
> FROM snicker_group_mapping vtgm
> WHERE exists
> (
> SELECT
> *
> FROM snicker_group vtg
> WHERE vtgm.snicker_group_id = vtg.id
> AND lower(vtg.title) ~* 'test'
> )
> UNION
> SELECT
> snicker.id
> FROM snicker
> WHERE lower(snicker.name_singular) ~* 'test'
> OR lower(snicker.name_plural) ~* 'test'
> ) AS vt_id
> WHERE vt_id is not null;

While the crash is certainly a bug, the answer is going to be "don't do
that". Testing a whole record for null-ness is not meaningful.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris Browne 2006-02-13 14:59:33 Re: How to VACUUM this table? "998994633 estimated total rows"
Previous Message Tom Lane 2006-02-13 14:26:59 Re: what's stored in pg_tblspc