Skip site navigation (1) Skip section navigation (2)

Re: [JDBC] Optimize postgres protocol for fixed size arrays

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Mikko Tiihonen <mikko(dot)tiihonen(at)nitorcreations(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [JDBC] Optimize postgres protocol for fixed size arrays
Date: 2011-11-22 23:41:46
Message-ID: CA+0W9LMJM-XjvDPcN7kQEp1O1UHtp1qoXV_n-P9nXCzZWKKg1w@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-jdbc
On 23 November 2011 10:47, Mikko Tiihonen
<mikko(dot)tiihonen(at)nitorcreations(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2011-11-22 23:52:24
Subject: Re: [JDBC] Optimize postgres protocol for fixed size arrays
Previous:From: Simon RiggsDate: 2011-11-22 23:40:29
Subject: Re: Not HOT enough

pgsql-jdbc by date

Next:From: Tom LaneDate: 2011-11-22 23:52:24
Subject: Re: [JDBC] Optimize postgres protocol for fixed size arrays
Previous:From: Merlin MoncureDate: 2011-11-22 22:46:24
Subject: Re: Optimize postgres protocol for fixed size arrays

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group