Re: pgsql: Fix crash in BRIN inclusion op functions, due to missing datum c

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Fix crash in BRIN inclusion op functions, due to missing datum c
Date: 2020-01-22 21:45:36
Message-ID: 20200122214536.GA3912@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 2020-Jan-20, Heikki Linnakangas wrote:

> That case arises at least with the range_union() function, when one of
> the arguments is an 'empty' range:
>
> CREATE TABLE brintest (n numrange);
> CREATE INDEX brinidx ON brintest USING brin (n);
> INSERT INTO brintest VALUES ('empty');
> INSERT INTO brintest VALUES (numrange(0, 2^1000::numeric));
> INSERT INTO brintest VALUES ('(-1, 0)');
>
> SELECT brin_desummarize_range('brinidx', 0);
> SELECT brin_summarize_range('brinidx', 0);

I noticed that this test increases line-wise coverage of
brin_inclusion.c by a few percentage points, so I added it.

Again, thanks

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2020-01-23 06:57:06 pgsql: Clarify some comments in vacuumlazy.c
Previous Message Alvaro Herrera 2020-01-22 21:42:09 pgsql: Add BRIN test case

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-01-22 22:06:28 Re: A rather hackish POC for alternative implementation of WITH TIES
Previous Message Dmitry Dolgov 2020-01-22 21:37:16 Re: Index Skip Scan