rangesel() bugs on basic comparison operators with an empty range

Started by Emre Hasegeliabout 11 years ago5 messagesbugs
Jump to latest
#1Emre Hasegeli
emre@hasegeli.com

I found a few bugs on the selectivity estimation function for
the range types, rangesel() for empty ranges.

# create table a (b int4range);
CREATE TABLE

# select * from a where b < 'empty';
ERROR: unexpected operator 3884

# select * from a where b >= 'empty';
ERROR: unexpected operator 3886

Patch attached.

Attachments:

rangesel-empty-fix.patchapplication/octet-stream; name=rangesel-empty-fix.patchDownload+52-10
#2Emre Hasegeli
emre@hasegeli.com
In reply to: Emre Hasegeli (#1)
Re: rangesel() bugs on basic comparison operators with an empty range

Patch attached.

I found one more place, new version attached.

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Emre Hasegeli (#2)
Re: rangesel() bugs on basic comparison operators with an empty range

Emre Hasegeli <emre@hasegeli.com> writes:

I found one more place, new version attached.

I see no patch here ...

regards, tom lane

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#4Emre Hasegeli
emre@hasegeli.com
In reply to: Tom Lane (#3)
Re: rangesel() bugs on basic comparison operators with an empty range

I see no patch here ...

I am sorry. Now attached.

Attachments:

rangesel-empty-fix-v2.patchapplication/octet-stream; name=rangesel-empty-fix-v2.patchDownload+54-12
#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Emre Hasegeli (#4)
Re: rangesel() bugs on basic comparison operators with an empty range

Emre Hasegeli <emre@hasegeli.com> writes:

I see no patch here ...

I am sorry. Now attached.

Applied with some additional cleanup.

regards, tom lane

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs