Re: setBinaryStream can abandon connection - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: setBinaryStream can abandon connection
Date
Msg-id 41732423.1080407@opencloud.com
Whole thread Raw
In response to Re: setBinaryStream can abandon connection  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
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

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: setBinaryStream can abandon connection
Next
From: Simon Moses
Date:
Subject: create view problem