Unexpected input in plpgsql script.

From: Sebestyen Zoltan <szoli(at)netvisor(dot)hu>
To: PostgreSQL general mailinglist <pgsql-general(at)postgreSQL(dot)org>
Subject: Unexpected input in plpgsql script.
Date: 1999-02-02 20:15:25
Message-ID: Pine.LNX.3.96.990202210935.146A-100000@linux.intranet.netvisor.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Let's suppose I have a table called bla;
It has only one attr, called szam, type int8. If this table is empty then
the 'select sum(szam) from bla;' query returns the following output:

sum
---

(1 row)

I.e. there's a row containing NOTHING. I wrote a number formatter script
with a help of this list which works beautifully except for this case. In
this case I've got the following message:
pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally before or
while processing the request. We have lost the connection to the backend,
so further processing is impossible.
Terminating.

How can I handle such a case in a plpgsql function or how could I avoid
it?

Thanks in advance

--------------------------------------------------------------------------------
Sebestyén Zoltán <szoli(at)netvisor(dot)hu> I'm believing that the Holy Spirit is
gonna allow the hand, and the foot, and
MAKE INSTALL NOT WAR the mouth, just to begin to speak, and
to minister, and to heal coordinated by
the head.

I use UNIX because reboots are for hardware upgrades.

-- Waiting for FreeBSD 3.1, not Godot --

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sebestyen Zoltan 1999-02-02 20:49:19 How to use plpgsql on AIX
Previous Message Jackson, DeJuan 1999-02-02 19:55:39 RE: [GENERAL] Missing features ?