Kris Jurka wrote:
> OK. So we should calculate the total message length using a "long"
> variable to guard against overflow and then check that it doesn't exceed
> MaxAllocSize. If it does, do not issue the bind at all and throw an
> Exception in a fashion that keeps the connection in working order.
Sounds reasonable.
I was wondering if it was worth teaching PGstream (or a subclass) about
the protocol format. Then it could automatically check for oversize
messages, that we wrote as much data we claimed, and that when reading a
server message we consumed the entire message. I don't know what the
overhead of doing this would be, though.
-O