Re: Optimize postgres protocol for fixed size arrays - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: Optimize postgres protocol for fixed size arrays
Date
Msg-id CA+0W9LMJM-XjvDPcN7kQEp1O1UHtp1qoXV_n-P9nXCzZWKKg1w@mail.gmail.com
Whole thread Raw
In response to Optimize postgres protocol for fixed size arrays  (Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>)
Responses Re: [HACKERS] Optimize postgres protocol for fixed size arrays
List pgsql-jdbc
On 23 November 2011 10:47, Mikko Tiihonen
<mikko.tiihonen@nitorcreations.com> wrote:

> Here is a patch that adds a new flag to the protocol that is set when all
> elements of the array are of same fixed size.
> When the bit is set the 4 byte length is only sent once and not for each
> element. Another restriction is that the flag
> can only be set when there are no NULLs in the array.

How does a client detect that this feature is supported?

At a glance the JDBC patch doesn't use it on the send path, but
presumably clients could use this when sending binary-format arrays to
the server - but only if the server understood the format.

(Ideally a pair of settings would be useful here - one to say "the
server understands the new format" and another the client sets to say
"please use the new format" that defaults to off - then you could
avoid confusing old clients, too)

Oliver

pgsql-jdbc by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: [HACKERS] Optimize postgres protocol for fixed size arrays
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Optimize postgres protocol for fixed size arrays