From: | "jose' soares" <sferac(at)bo(dot)nettuno(dot)it> |
---|---|
To: | Sebestyen Zoltan <szoli(at)netvisor(dot)hu> |
Cc: | PostgreSQL general mailinglist <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: [GENERAL] Unexpected input in plpgsql script. |
Date: | 1999-02-03 14:42:25 |
Message-ID: | 36B86051.9997AFB@bo.nettuno.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Sebestyen Zoltan ha scritto:
> 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)
This is normal. SUM() returns all the time one row, in this case value is NULL
because there are no rows in the table.
>
>
> 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?
What you want to do in plpgsql?
-Jose'-
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Hoffmann | 1999-02-03 15:14:37 | Re: [GENERAL] Cost: Big Tables vs. Organized Separation of Data |
Previous Message | Herouth Maoz | 1999-02-03 12:17:27 | Re: [GENERAL] Unexpected input in plpgsql script. |