psql command drops connection to backend - Mailing list pgsql-hackers

From Theo Kramer
Subject psql command drops connection to backend
Date
Msg-id 199903082022.WAA20820@flame.flame.co.za
Whole thread Raw
List pgsql-hackers
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name        : Theo Kramer
Your email address    : theo@flame.co.za

Category        : runtime: back-end
Severity        : serious

Summary: psql commands

System Configuration
--------------------
  Operating System   : Redhat 5.0 Kernel 2.0.35

  PostgreSQL version : 6.5

  Compiler used      : gcc 2.7.2.3-8

Hardware:
---------
Pentium PRO 200 MHz 96 MByte Ram

Versions of other tools:
------------------------
make-3.76.1-2

--------------------------------------------------------------------------
Problem Description:
--------------------
Commands in psql that return nothing cause backend to drop.

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

Test Case:
----------

The following illustrates the problem. Note that this is when no tables
have been created. Creating a table (no indexes) then \d works fine,
however, a command like \di then again causes the backend to drop.


[postgres@flame postgres]$ psql template1
Welcome to the POSTGRESQL interactive sql monitor:
  Please read the file COPYRIGHT for copyright terms of POSTGRESQL

   type \? for help on slash commands
   type \q to quit
   type \g or terminate with semicolon to execute query
 You are currently connected to the database: template1

template1=> \d
pqReadData() -- backend closed the channel unexpectedly.
        This probably means the backend terminated abnormally
        before or while processing the request.
template1=> \q
[postgres@flame postgres]$

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

Solution:
---------

Function pqReadData() closes the connection when nread == 0. Is this correct
when there is no result set??

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

Regards
Theo

pgsql-hackers by date:

Previous
From: Vince Vielhaber
Date:
Subject: Re: [HACKERS] Developers globe
Next
From: "D'Arcy" "J.M." Cain
Date:
Subject: Re: [HACKERS] Developers globe