Proposed fix for Bug #15259 (invalid empty array returned by intarray"&" operator) - Mailing list pgsql-hackers

From Alexey Kryuchkov
Subject Proposed fix for Bug #15259 (invalid empty array returned by intarray"&" operator)
Date
Msg-id CAN85JcYphDLYt4CpMDLZjjNVqGDrFJ5eS3YF=wLAhFoDQuBsyg@mail.gmail.com
Whole thread Raw
Responses Re: Proposed fix for Bug #15259 (invalid empty array returned by intarray "&" operator)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
The attached patch fixes Bug #15259 [1] in the intarray module, making the
'&' array intersection operator return proper zero-dimensional empty arrays
instead of one-dimensional, zero-length "empty" arrays.

In [2] this problem was addressed by changing the behaviour of
construct_[md_]array(), but the intarray module does not use these
functions. The patch I propose contains the relevant fixes to the
intarray module, along with regression tests.


Best regards,

        Alexey Kryuchkov

Attachment

pgsql-hackers by date:

Previous
From: Isaac Morland
Date:
Subject: Re: psql \df option for procedures
Next
From: Peter Geoghegan
Date:
Subject: Re: Making all nbtree entries unique by having heap TIDs participatein comparisons