"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