On Mon, 11 Apr 2005, Andras Kadinger wrote:
> I am unclear as to how to handle possible protocol errors (e.g. when what
> we end up reading from the connection is not an 'A'sync Notify).
> Theoretically, in a working connection this should not happen though.
Yes, it could: reading the PostgreSQL protocol documentation, it says
"frontends should always be prepared to accept and display NoticeResponse
messages, even when the connection is nominally idle".
So I now added code to process Error 'N'otifications as well.