Thread: Port Bug Report: pqReadData() -- backend closed the channel unexpectedly
Port Bug Report: pqReadData() -- backend closed the channel unexpectedly
From
Unprivileged user
Date:
============================================================================ POSTGRESQL BUG REPORT TEMPLATE ============================================================================ Your name : Stoyan Genov Your email address : genov@digsys.bg Category : runtime: back-end Severity : critical Summary: pqReadData() -- backend closed the channel unexpectedly System Configuration -------------------- Operating System : i386-pc-bsdi4.0 PostgreSQL version : 6.4.2 Compiler used : Hardware: --------- uname -a == lorna lorna 3.2 2 i386 CPU == K6/2 300 MHz RAM == 64 MB Versions of other tools: ------------------------ gcc2.ver == 2.7.2.1 lex.ver == 2.5.4 -------------------------------------------------------------------------- Problem Description: -------------------- The backend terminates abnormally when a query is executed from the psql monitor and there is a comparison between a scalar int4 variable and an element of _int4 array and the array element is on the right side of the comparison operator. -------------------------------------------------------------------------- Test Case: ---------- shell-prompt> createdb tmp shell-prompt> psql tmp tmp=> create table tbl1 ( i int4, j int4 ); tmp=> create table tbl2 ( iarr int4[], jarr int4[]); tmp=> insert into tbl1 values ( 1, 3 ); tmp=> insert into tbl1 values ( 2, 4 ); tmp=> insert into tbl1 values ( 5, 6 ); tmp=> insert into tbl2 values ( '{1, 2}', '{3, 4}' ); tmp=> insert into tbl2 values ( '{5, 6, 7}', '{8, 9}' ); tmp=> select 1 where tbl2.iarr[1] = 1; ?column? -------- 1 tmp=> select 1 where tbl2.iarr[1] = tbl1.i; ?column? -------- 1 1 tmp=> select 1 where tbl1.i = tbl2.iarr[1]; pqReadData() -- backend closed the channel unexpectedly. ..... Terminating. shell-prompt> pg_dump tmp > tmp.sql shell-prompt> destroydb tmp shell-prompt> createdb tmp shell-prompt> psql tmp < tmp.sql shell-prompt> psql tmp tmp=> select 1 where tbl1.i = tbl2.iarr[2]; pqReadData() -- backend closed the channel unexpectedly. ..... Terminating. shell-prompt> psql tmp tmp=> delete from tbl1; tmp=> delete from tbl2; tmp=> select 1 where tbl1.i = tbl2.iarr[1]; ?column? -------- ( 0 rows) --- end of example --- -------------------------------------------------------------------------- Solution: --------- --------------------------------------------------------------------------