pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Addendum: PG6.5.3: CASE w. diff THEN types -- prob with Linux(?)
3+ messages / 3 participants
[nested] [flat]

* Addendum: PG6.5.3: CASE w. diff THEN types -- prob with Linux(?)
@ 1999-11-30 16:43  Emils Klotins <emils@mail.usis.bkc.lv>
  0 siblings, 2 replies; 3+ messages in thread

From: Emils Klotins @ 1999-11-30 16:43 UTC (permalink / raw)
  To: pgsql-sql

FYI.

I posted a note couple of days ago about CASE WHEN clause 
causing backend termination. I was able to get my hands on 
FreeBSD machine and the statement does not break the 
backend:

[ PostgreSQL 6.5.3 on i386-unknown-freebsd3.3, compiled by 
gcc 2.7.2.3 ]
=> select case when 3=1 then 'rrr'::text else 5 end;
ERROR:  CASE/WHEN types 'int4' and 'text' not matched
=> 


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.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.
pqFlush() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally before or while processing the request.
=> \q



Emils



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [SQL] Addendum: PG6.5.3: CASE w. diff THEN types -- prob with Linux(?)
@ 1999-11-30 22:04  Oliver Elphick <olly@lfix.co.uk>
  parent: Emils Klotins <emils@mail.usis.bkc.lv>
  1 sibling, 0 replies; 3+ messages in thread

From: Oliver Elphick @ 1999-11-30 22:04 UTC (permalink / raw)
  To: Emils Klotins <emils@mail.usis.bkc.lv>; +Cc: pgsql-sql

"Emils Klotins" wrote:
  >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 p
      >ossibly corrupted shared memory.

This works OK on current Debian GNU/Linux, unstable distribution.  Perhaps
you need to use the Red Hat 6.1.

-- 
      Vote against SPAM: http://www.politik-digital.de/spam/
                 ========================================
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
               PGP key from public servers; key ID 32B8FAA1
                 ========================================
     "But grow in grace, and in the knowledge of our Lord 
      and Saviour Jesus Christ. To him be glory both now and
      for ever. Amen."           II Peter 3:18 





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [SQL] Addendum: PG6.5.3: CASE w. diff THEN types -- prob with Linux(?)
@ 1999-11-30 22:56  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Emils Klotins <emils@mail.usis.bkc.lv>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 1999-11-30 22:56 UTC (permalink / raw)
  To: Emils Klotins <emils@mail.usis.bkc.lv>; +Cc: 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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~1999-11-30 22:56 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-11-30 16:43 Addendum: PG6.5.3: CASE w. diff THEN types -- prob with Linux(?) Emils Klotins <emils@mail.usis.bkc.lv>
1999-11-30 22:04 ` Oliver Elphick <olly@lfix.co.uk>
1999-11-30 22:56 ` Tom Lane <tgl@sss.pgh.pa.us>

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