Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id RAA50844 for ; Tue, 30 Nov 1999 17:57:19 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id RAA22449; Tue, 30 Nov 1999 17:56:35 -0500 (EST) To: "Emils Klotins" cc: pgsql-sql@postgreSQL.org Subject: Re: [SQL] Addendum: PG6.5.3: CASE w. diff THEN types -- prob with Linux(?) In-reply-to: Your message of Tue, 30 Nov 1999 16:43:50 EET <14344673472060@bkc.lv> Date: Tue, 30 Nov 1999 17:56:35 -0500 Message-ID: <22447.944002595@sss.pgh.pa.us> From: Tom Lane "Emils Klotins" 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