Re: How to handle error message in PG_CATCH - Mailing list pgsql-hackers

From Tom Lane
Subject Re: How to handle error message in PG_CATCH
Date
Msg-id 16410.1204651773@sss.pgh.pa.us
Whole thread Raw
In response to Re: How to handle error message in PG_CATCH  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Responses Re: How to handle error message in PG_CATCH
List pgsql-hackers
Zdenek Kotala <Zdenek.Kotala@Sun.COM> writes:
> Alvaro Herrera napsal(a):
>> Zdenek Kotala wrote:
>>> At the end I got following message:
>>> 
>>> ERROR:  Error test
>>> CONTEXT:  Context error
>>> server sent data ("D" message) without prior row description ("T" message)
>> 
>> I don't see anything wrong with this code.  Perhaps the problem is
>> somewhere else?

> There is whole test code. It is store procedure and there are nothing 
> special.  The difference between this and autovacuum is that autovacuum 
> works without client side.

The problem with this is it's violating the wire protocol.  Once you've
sent the client an ERROR message, it no longer expects to see any result
from the SELECT that called the function.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: Google Summer of Code 2008
Next
From: Tom Lane
Date:
Subject: Re: "could not open relation 1663/16384/16584: No such file or directory" in a specific combination of transactions with temp tables