"madhtr" <madhtr(at)schif(dot)org> writes:
> ... here's the source ... can u tell me whats wrong?
Well, your usage of "pge" seems fairly broken, in particular the random
(and wrong) assumptions about which values are or are not zero. AFAICT
this code doesn't really distinguish between PGRES_POLLING_FAILED and
PGRES_POLLING_OK. And if it does return failure, there's no way for the
caller to know which enum type the failure code belongs to.
You didn't show us the code that is actually reporting the error, but I
wonder whether it isn't equally confused about how to determine what the
error is.
regards, tom lane