Re: [SQL] Addendum: PG6.5.3: CASE w. diff THEN types -- prob with Linux(?) - Mailing list pgsql-sql

From Tom Lane
Subject Re: [SQL] Addendum: PG6.5.3: CASE w. diff THEN types -- prob with Linux(?)
Date
Msg-id 22447.944002595@sss.pgh.pa.us
Whole thread Raw
In response to Addendum: PG6.5.3: CASE w. diff THEN types -- prob with Linux(?)  ("Emils Klotins" <emils@mail.usis.bkc.lv>)
List pgsql-sql
"Emils Klotins" <emils@mail.usis.bkc.lv> writes:
> The same statement on RedHat 5.2 Linux machine breaks the 
> backend:

> [ PostgreSQL 6.5.3 on i586-pc-linux-gnu, compiled by gcc 
> 2.7.2.3 ]
> => select case when 3=1 then 'rrr'::text when 3=2 else 5 end;
> NOTICE:  Message from PostgreSQL backend:
> The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory.

Now that I look more closely, the above statement isn't legal: it's
missing the second "then" clause.  You should have gotten a syntax
error, and indeed I do get one:

regression=>  select case when 3=1 then 'rrr'::text when 3=2 else 5 end;
ERROR:  parser: parse error at or near "else"

I wonder whether you built Postgres with a busted parser generator.
RedHat presumably supplies the GNU parser generator "bison", but
what version?  We usually recommend 1.25 or later...
        regards, tom lane


pgsql-sql by date:

Previous
From: "Oliver Elphick"
Date:
Subject: Re: [SQL] Addendum: PG6.5.3: CASE w. diff THEN types -- prob with Linux(?)
Next
From: Mark Kirkwood
Date:
Subject: slow sort for simple join