I think there's a bug with NULL handling:
CREATE TABLE slope_nulls_test (v int4);
INSERT INTO slope_nulls_test SELECT generate_series(1, 10);
INSERT INTO slope_nulls_test VALUES (NULL), (NULL);
CREATE INDEX slope_nulls_idx ON slope_nulls_test (v ASC NULLS FIRST);
ANALYZE slope_nulls_test;
SET enable_seqscan = off;
SELECT floor(v::float8), v FROM slope_nulls_test ORDER BY 1;
RESET enable_seqscan;
SET enable_indexscan = off;
SELECT floor(v::float8), v FROM slope_nulls_test ORDER BY 1;
{ oid => '2308', descr => 'nearest integer >= value',
- proname => 'ceil', prorettype => 'float8', proargtypes => 'float8',
- prosrc => 'dceil' },
+ proname => 'ceil', prosupport => 'arg0_asc_slope_support',
+ prorettype => 'float8', proargtypes => 'float8', prosrc => 'dceil' },
{ oid => '2320', descr => 'nearest integer >= value',
proname => 'ceiling', prorettype => 'float8', proargtypes => 'float8',
prosrc => 'dceil' },
Shouldn't 2320 also have the same change? Same for 1711/2167
{ oid => '183',
- proname => 'int42mi', prorettype => 'int4', proargtypes => 'int4 int2',
- prosrc => 'int42mi' },
+ proname => 'int42mi', prosupport => 'diff_slope_support',
+ prorettype => 'int4', proargtypes => 'int4 int2', prosrc => 'int42mi' },
Similarly shouldn't int24/int42 mul and div also be included?