From: Tom Lane <tgl@sss.pgh.pa.us>
To: Yeb Havinga <yebhavinga@gmail.com>
Cc: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5748: Invalid oidvector data during binary recv
Date: Mon, 15 Nov 2010 11:51:46 -0500
Message-ID: <16032.1289839906@sss.pgh.pa.us> (raw)
In-Reply-To: <14024.1289834527@sss.pgh.pa.us>
References: <201011111430.oABEUVPe067398@wwwmaster.postgresql.org>
<15298.1289490490@sss.pgh.pa.us>
<4CDC1380.2090309@enterprisedb.com>
<4CE10697.3050309@gmail.com>
<4CE10E39.9080806@enterprisedb.com>
<4CE111D6.5070801@gmail.com>
<14024.1289834527@sss.pgh.pa.us>
I wrote:
> Yeb Havinga <yebhavinga@gmail.com> writes:
>> Binary send and recv of the value at hand would change it into a 0-D vector.
> The reason for that is that in general we don't make a distinction
> between zero-size arrays of different dimensions.
Actually, after consuming a bit more caffeine, I see what Yeb is on about.
Even though the system in general doesn't make much of a distinction
between zero-element arrays of different dimensionalities, there *are*
functions that can distinguish --- array_ndims() being the most obvious
one. Shouldn't we ensure that binary dump and reload of an array value
doesn't change the value in any SQL-observable way? If so, I think his
patch is correct, even though it's changing more than just the
originally-complained-of behavior.
While I'm looking at this ... why is it that array_ndims returns NULL
and not 0 for a zero-dimensional array? 0-D arrays might have been
unsupported at one time, but they're certainly considered valid now.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, yebhavinga@gmail.com, heikki.linnakangas@enterprisedb.com
Subject: Re: BUG #5748: Invalid oidvector data during binary recv
In-Reply-To: <16032.1289839906@sss.pgh.pa.us>
References: <201011111430.oABEUVPe067398@wwwmaster.postgresql.org> <15298.1289490490@sss.pgh.pa.us> <4CDC1380.2090309@enterprisedb.com> <4CE10697.3050309@gmail.com> <4CE10E39.9080806@enterprisedb.com> <4CE111D6.5070801@gmail.com> <14024.1289834527@sss.pgh.pa.us> <16032.1289839906@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox