Skip site navigation (1) Skip section navigation (2)

Port Bug Report: pqReadData() -- backend closed the channel unexpectedly

From: Unprivileged user <nobody>
To: pgsql-ports(at)postgresql(dot)org
Subject: Port Bug Report: pqReadData() -- backend closed the channel unexpectedly
Date: 1999-04-20 17:18:57
Message-ID: 199904201718.NAA63901@hub.org (view raw or flat)
Thread:
Lists: pgsql-ports
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name               : Stoyan Genov
Your email address      : genov(at)digsys(dot)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:
---------


--------------------------------------------------------------------------


pgsql-ports by date

Next:From: Joost KraaijeveldDate: 1999-04-21 05:07:47
Subject: RE: [PORTS] Re: psql under win32
Previous:From: Thomas LockhartDate: 1999-04-20 16:27:15
Subject: Re: psql under win32

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group