提交 e782e31b 编写于 作者: H Heikki Linnakangas

Generate bitmap AM opfamilies automatically from btree opfamilies.

Bitmap AM relies on B-tree index code for all the operator support. In
fact, it creates an actual B-tree index, the LOV index, and lets the LOV
index evaluate the operators. We should have all the same operator classes
and families for bitmap index AM that we have for B-trees.

Perhaps we should teach the planner to reuse the B-tree opfamilies for
bitmap indexes. But for now, let's auto-generate the bitmap opfamiles at
initdb-time from the corresponding B-tree opfamilies. That ensures that the
two stay in sync, and we don't need to carry the diff vs. upstream in the
catalog headers.

This changes the OIDs for the opclasses and opfamilies, so bump catversion.
That shouldn't affect upgrade, or clients, though. They should operate on
opclass/opfamily names, not OIDs.

Some of the operators are still not indexable using bitmap indexes, because
they are handled by special code in the backend, see
match_special_index_operator(). But it doesn't do harm to have the entries
in the catalogs for them, anyway. An example of this is the inet << inet
operator and its siblings.

One user-visible effect of this is that you can now create a bitmap index
on the 'complex' datatype.

I did this now, because I was seeing 'opr_sanity' test failure on the 9.6
merge branch, because some cross-type operators were missing for bitmap
indexes. That was because the integer bitmap operator classes were not
gathered into the same operator family, they were still following the old
model, from before operator families were introduced. So there were
separate int2_ops, int4_ops, int8_ops operator families, whereas with the
B-tree, there's only one integer_ops operator family, which contains all
the opclasses and cross-type operators. I don't think it makes any
practical difference, though. For the B-tree, including all "compatible"
operators in the same opfamily allows the planner to deduce quals more
freely, but I'm not sure if that's significant for the bitmap AM, because
all the b-tree operators already exist.

Also change pg_am.amsupport for bitmap AM, to account for the new
'sortsupport' support function that was added to B-tree AM. I'm not sure
if bitmap indexes can actually make use of it yet, but we now copy all
the pg_amproc rows, so pg_am.amsupport better match or 'opr_sanity' test
complains.
Reviewed-by: NAshwin Agrawal <aagrawal@pivotal.io>
上级 f19073f2
......@@ -46,6 +46,59 @@ GRANT SELECT ON gp_distributed_log TO PUBLIC;
ALTER RESOURCE QUEUE pg_default WITH (priority=medium, memory_limit='-1');
--
-- Bitmap Index AM supports all the same operations as the B-tree index, it
-- just stores the entries differently. Make copies of all the built-in B-tree
-- operator classes and families for the bitmap AM, too.
--
do $$
declare
btree_amoid oid;
bitmap_amoid oid;
btree_opfam_oid oid;
bitmap_opfam_oid oid;
opfam_row pg_opfamily;
opclass_row pg_opclass;
amop_row pg_amop;
amproc_row pg_amproc;
begin
-- Fetch OIDs of the B-tree and bitmap AMs.
btree_amoid = (select oid from pg_am where amname = 'btree');
bitmap_amoid = (select oid from pg_am where amname = 'bitmap');
-- Loop through all B-tree opfamilies.
FOR btree_opfam_oid IN select oid as r from pg_opfamily WHERE opfmethod = btree_amoid LOOP
-- Copy this B-tree opfamily for the Bitmap AM.
SELECT * INTO opfam_row FROM pg_opfamily WHERE oid = btree_opfam_oid;
opfam_row.opfmethod = bitmap_amoid;
INSERT INTO pg_opfamily SELECT opfam_row.*;
GET DIAGNOSTICS bitmap_opfam_oid = RESULT_OID;
-- Also copy all operator classes belonging to this opfamily.
FOR opclass_row IN select * from pg_opclass where opcfamily = btree_opfam_oid LOOP
opclass_row.opcfamily = bitmap_opfam_oid;
opclass_row.opcmethod = bitmap_amoid;
-- Reverse of the "ugly little hack" to store 'name' columns as
-- 'cstrings' in b-tree indexes (see pg_opclass.h). The hack will kick
-- in for the LOV index, anyway, but we mustn't try to use 'cstring' in
-- the LOV heap.
IF opclass_row.opcname='name_ops' THEN
opclass_row.opckeytype = 0;
END IF;
INSERT INTO pg_opclass SELECT opclass_row.*;
END LOOP;
-- And all pg_amop and pg_amproc rows.
FOR amop_row IN select * from pg_amop where amopfamily = btree_opfam_oid LOOP
amop_row.amopfamily = bitmap_opfam_oid;
amop_row.amopmethod = bitmap_amoid;
INSERT INTO pg_amop SELECT amop_row.*;
END LOOP;
FOR amproc_row IN select * from pg_amproc where amprocfamily = btree_opfam_oid LOOP
amproc_row.amprocfamily = bitmap_opfam_oid;
INSERT INTO pg_amproc SELECT amproc_row.*;
END LOOP;
END LOOP;
end;
$$;
CREATE SCHEMA gp_toolkit;
RESET log_min_messages;
......@@ -56,6 +56,6 @@
*/
/* 3yyymmddN */
#define CATALOG_VERSION_NO 301909301
#define CATALOG_VERSION_NO 301910111
#endif
......@@ -151,7 +151,7 @@ DATA(insert OID = 3580 ( brin 0 15 f f f f t t f t t f f 0 brininsert brinbe
DESCR("block range index (BRIN) access method");
#define BRIN_AM_OID 3580
DATA(insert OID = 7013 ( bitmap 5 1 f f f t t t f f f f f 0 bminsert bmbeginscan bmgettuple bmgetbitmap bmrescan bmendscan bmmarkpos bmrestrpos bmbuild bmbuildempty bmbulkdelete bmvacuumcleanup - bmcostestimate bmoptions ));
DATA(insert OID = 7013 ( bitmap 5 2 f f f t t t f f f f f 0 bminsert bmbeginscan bmgettuple bmgetbitmap bmrescan bmendscan bmmarkpos bmrestrpos bmbuild bmbuildempty bmbulkdelete bmvacuumcleanup - bmcostestimate bmoptions ));
DESCR("bitmap index access method");
#define BITMAP_AM_OID 7013
......
......@@ -748,7 +748,7 @@ DATA(insert ( 3702 3615 3615 7 s 3693 783 0 ));
DATA(insert ( 3702 3615 3615 8 s 3694 783 0 ));
/*
* * btree range_ops
* btree range_ops
*/
DATA(insert ( 3901 3831 3831 1 s 3884 403 0 ));
DATA(insert ( 3901 3831 3831 2 s 3885 403 0 ));
......@@ -1133,414 +1133,6 @@ DATA(insert ( 4104 603 603 12 s 2572 3580 0 ));
/* we could, but choose not to, supply entries for strategies 13 and 14 */
DATA(insert ( 4104 603 600 7 s 433 3580 0 ));
/*
* the operators for the on-disk bitmap index.
*/
/*
* on-disk bitmap index abstime
*/
DATA(insert ( 7014 702 702 1 s 562 7013 0 ));
DATA(insert ( 7014 702 702 2 s 564 7013 0 ));
DATA(insert ( 7014 702 702 3 s 560 7013 0 ));
DATA(insert ( 7014 702 702 4 s 565 7013 0 ));
DATA(insert ( 7014 702 702 5 s 563 7013 0 ));
/*
* on-disk bitmap index array
*/
DATA(insert ( 7015 2277 2277 1 s 1072 7013 0 ));
DATA(insert ( 7015 2277 2277 2 s 1074 7013 0 ));
DATA(insert ( 7015 2277 2277 3 s 1070 7013 0 ));
DATA(insert ( 7015 2277 2277 4 s 1075 7013 0 ));
DATA(insert ( 7015 2277 2277 5 s 1073 7013 0 ));
/*
* on-disk bitmap index bit
*/
DATA(insert ( 7016 1560 1560 1 s 1786 7013 0 ));
DATA(insert ( 7016 1560 1560 2 s 1788 7013 0 ));
DATA(insert ( 7016 1560 1560 3 s 1784 7013 0 ));
DATA(insert ( 7016 1560 1560 4 s 1789 7013 0 ));
DATA(insert ( 7016 1560 1560 5 s 1787 7013 0 ));
/*
* on-disk bitmap index bool
*/
DATA(insert ( 7017 16 16 1 s 58 7013 0 ));
DATA(insert ( 7017 16 16 2 s 1694 7013 0 ));
DATA(insert ( 7017 16 16 3 s 91 7013 0 ));
DATA(insert ( 7017 16 16 4 s 1695 7013 0 ));
DATA(insert ( 7017 16 16 5 s 59 7013 0 ));
/*
* on-disk bitmap index bpchar
*/
DATA(insert ( 7018 1042 1042 1 s 1058 7013 0 ));
DATA(insert ( 7018 1042 1042 2 s 1059 7013 0 ));
DATA(insert ( 7018 1042 1042 3 s 1054 7013 0 ));
DATA(insert ( 7018 1042 1042 4 s 1061 7013 0 ));
DATA(insert ( 7018 1042 1042 5 s 1060 7013 0 ));
/*
* on-disk bitmap index bytea
*/
DATA(insert ( 7019 17 17 1 s 1957 7013 0 ));
DATA(insert ( 7019 17 17 2 s 1958 7013 0 ));
DATA(insert ( 7019 17 17 3 s 1955 7013 0 ));
DATA(insert ( 7019 17 17 4 s 1960 7013 0 ));
DATA(insert ( 7019 17 17 5 s 1959 7013 0 ));
/*
* on-disk bitmap index char
*/
DATA(insert ( 7020 18 18 1 s 631 7013 0 ));
DATA(insert ( 7020 18 18 2 s 632 7013 0 ));
DATA(insert ( 7020 18 18 3 s 92 7013 0 ));
DATA(insert ( 7020 18 18 4 s 634 7013 0 ));
DATA(insert ( 7020 18 18 5 s 633 7013 0 ));
/*
* on-disk bitmap index date
*/
DATA(insert ( 7022 1082 1082 1 s 1095 7013 0 ));
DATA(insert ( 7022 1082 1082 2 s 1096 7013 0 ));
DATA(insert ( 7022 1082 1082 3 s 1093 7013 0 ));
DATA(insert ( 7022 1082 1082 4 s 1098 7013 0 ));
DATA(insert ( 7022 1082 1082 5 s 1097 7013 0 ));
/*
* date-timestamp
*/
DATA(insert ( 7022 1082 1114 1 s 2345 7013 0 ));
DATA(insert ( 7022 1082 1114 2 s 2346 7013 0 ));
DATA(insert ( 7022 1082 1114 3 s 2347 7013 0 ));
DATA(insert ( 7022 1082 1114 4 s 2348 7013 0 ));
DATA(insert ( 7022 1082 1114 5 s 2349 7013 0 ));
/*
* date-timestamptz
*/
DATA(insert ( 7022 1082 1184 1 s 2358 7013 0 ));
DATA(insert ( 7022 1082 1184 2 s 2359 7013 0 ));
DATA(insert ( 7022 1082 1184 3 s 2360 7013 0 ));
DATA(insert ( 7022 1082 1184 4 s 2361 7013 0 ));
DATA(insert ( 7022 1082 1184 5 s 2362 7013 0 ));
/*
* float4
*/
DATA(insert ( 7023 700 700 1 s 622 7013 0 ));
DATA(insert ( 7023 700 700 2 s 624 7013 0 ));
DATA(insert ( 7023 700 700 3 s 620 7013 0 ));
DATA(insert ( 7023 700 700 4 s 625 7013 0 ));
DATA(insert ( 7023 700 700 5 s 623 7013 0 ));
/*
* float48
*/
DATA(insert ( 7023 700 701 1 s 1122 7013 0 ));
DATA(insert ( 7023 700 701 2 s 1124 7013 0 ));
DATA(insert ( 7023 700 701 3 s 1120 7013 0 ));
DATA(insert ( 7023 700 701 4 s 1125 7013 0 ));
DATA(insert ( 7023 700 701 5 s 1123 7013 0 ));
/*
* float8
*/
DATA(insert ( 7024 701 701 1 s 672 7013 0 ));
DATA(insert ( 7024 701 701 2 s 673 7013 0 ));
DATA(insert ( 7024 701 701 3 s 670 7013 0 ));
DATA(insert ( 7024 701 701 4 s 675 7013 0 ));
DATA(insert ( 7024 701 701 5 s 674 7013 0 ));
/*
* float84
*/
DATA(insert ( 7024 701 700 1 s 1132 7013 0 ));
DATA(insert ( 7024 701 700 2 s 1134 7013 0 ));
DATA(insert ( 7024 701 700 3 s 1130 7013 0 ));
DATA(insert ( 7024 701 700 4 s 1135 7013 0 ));
DATA(insert ( 7024 701 700 5 s 1133 7013 0 ));
/*
* inet
*/
DATA(insert ( 7025 869 869 1 s 1203 7013 0 ));
DATA(insert ( 7025 869 869 2 s 1204 7013 0 ));
DATA(insert ( 7025 869 869 3 s 1201 7013 0 ));
DATA(insert ( 7025 869 869 4 s 1206 7013 0 ));
DATA(insert ( 7025 869 869 5 s 1205 7013 0 ));
/*
* int2
*/
DATA(insert ( 7026 21 21 1 s 95 7013 0 ));
DATA(insert ( 7026 21 21 2 s 522 7013 0 ));
DATA(insert ( 7026 21 21 3 s 94 7013 0 ));
DATA(insert ( 7026 21 21 4 s 524 7013 0 ));
DATA(insert ( 7026 21 21 5 s 520 7013 0 ));
/*
* int24
*/
DATA(insert ( 7026 21 23 1 s 534 7013 0 ));
DATA(insert ( 7026 21 23 2 s 540 7013 0 ));
DATA(insert ( 7026 21 23 3 s 532 7013 0 ));
DATA(insert ( 7026 21 23 4 s 542 7013 0 ));
DATA(insert ( 7026 21 23 5 s 536 7013 0 ));
/*
* int28
*/
DATA(insert ( 7026 21 20 1 s 1864 7013 0 ));
DATA(insert ( 7026 21 20 2 s 1866 7013 0 ));
DATA(insert ( 7026 21 20 3 s 1862 7013 0 ));
DATA(insert ( 7026 21 20 4 s 1867 7013 0 ));
DATA(insert ( 7026 21 20 5 s 1865 7013 0 ));
/*
* int4
*/
DATA(insert ( 7027 23 23 1 s 97 7013 0 ));
DATA(insert ( 7027 23 23 2 s 523 7013 0 ));
DATA(insert ( 7027 23 23 3 s 96 7013 0 ));
DATA(insert ( 7027 23 23 4 s 525 7013 0 ));
DATA(insert ( 7027 23 23 5 s 521 7013 0 ));
/*
* int42
*/
DATA(insert ( 7027 23 21 1 s 535 7013 0 ));
DATA(insert ( 7027 23 21 2 s 541 7013 0 ));
DATA(insert ( 7027 23 21 3 s 533 7013 0 ));
DATA(insert ( 7027 23 21 4 s 543 7013 0 ));
DATA(insert ( 7027 23 21 5 s 537 7013 0 ));
/*
* int48
*/
DATA(insert ( 7027 23 20 1 s 37 7013 0 ));
DATA(insert ( 7027 23 20 2 s 80 7013 0 ));
DATA(insert ( 7027 23 20 3 s 15 7013 0 ));
DATA(insert ( 7027 23 20 4 s 82 7013 0 ));
DATA(insert ( 7027 23 20 5 s 76 7013 0 ));
/*
* int8
*/
DATA(insert ( 7028 20 20 1 s 412 7013 0 ));
DATA(insert ( 7028 20 20 2 s 414 7013 0 ));
DATA(insert ( 7028 20 20 3 s 410 7013 0 ));
DATA(insert ( 7028 20 20 4 s 415 7013 0 ));
DATA(insert ( 7028 20 20 5 s 413 7013 0 ));
/*
* int82
*/
DATA(insert ( 7028 20 21 1 s 1870 7013 0 ));
DATA(insert ( 7028 20 21 2 s 1872 7013 0 ));
DATA(insert ( 7028 20 21 3 s 1868 7013 0 ));
DATA(insert ( 7028 20 21 4 s 1873 7013 0 ));
DATA(insert ( 7028 20 21 5 s 1871 7013 0 ));
/*
* int84
*/
DATA(insert ( 7028 20 23 1 s 418 7013 0 ));
DATA(insert ( 7028 20 23 2 s 420 7013 0 ));
DATA(insert ( 7028 20 23 3 s 416 7013 0 ));
DATA(insert ( 7028 20 23 4 s 430 7013 0 ));
DATA(insert ( 7028 20 23 5 s 419 7013 0 ));
/*
* interval
*/
DATA(insert ( 7029 1186 1186 1 s 1332 7013 0 ));
DATA(insert ( 7029 1186 1186 2 s 1333 7013 0 ));
DATA(insert ( 7029 1186 1186 3 s 1330 7013 0 ));
DATA(insert ( 7029 1186 1186 4 s 1335 7013 0 ));
DATA(insert ( 7029 1186 1186 5 s 1334 7013 0 ));
/*
* macaddr
*/
DATA(insert ( 7030 829 829 1 s 1222 7013 0 ));
DATA(insert ( 7030 829 829 2 s 1223 7013 0 ));
DATA(insert ( 7030 829 829 3 s 1220 7013 0 ));
DATA(insert ( 7030 829 829 4 s 1225 7013 0 ));
DATA(insert ( 7030 829 829 5 s 1224 7013 0 ));
/*
* name
*/
DATA(insert ( 7031 19 19 1 s 660 7013 0 ));
DATA(insert ( 7031 19 19 2 s 661 7013 0 ));
DATA(insert ( 7031 19 19 3 s 93 7013 0 ));
DATA(insert ( 7031 19 19 4 s 663 7013 0 ));
DATA(insert ( 7031 19 19 5 s 662 7013 0 ));
/*
* numeric
*/
DATA(insert ( 7032 1700 1700 1 s 1754 7013 0 ));
DATA(insert ( 7032 1700 1700 2 s 1755 7013 0 ));
DATA(insert ( 7032 1700 1700 3 s 1752 7013 0 ));
DATA(insert ( 7032 1700 1700 4 s 1757 7013 0 ));
DATA(insert ( 7032 1700 1700 5 s 1756 7013 0 ));
/*
* oid
*/
DATA(insert ( 7033 26 26 1 s 609 7013 0 ));
DATA(insert ( 7033 26 26 2 s 611 7013 0 ));
DATA(insert ( 7033 26 26 3 s 607 7013 0 ));
DATA(insert ( 7033 26 26 4 s 612 7013 0 ));
DATA(insert ( 7033 26 26 5 s 610 7013 0 ));
/*
* oidvector
*/
DATA(insert ( 7034 30 30 1 s 645 7013 0 ));
DATA(insert ( 7034 30 30 2 s 647 7013 0 ));
DATA(insert ( 7034 30 30 3 s 649 7013 0 ));
DATA(insert ( 7034 30 30 4 s 648 7013 0 ));
DATA(insert ( 7034 30 30 5 s 646 7013 0 ));
/*
* text
*/
DATA(insert ( 7035 25 25 1 s 664 7013 0 ));
DATA(insert ( 7035 25 25 2 s 665 7013 0 ));
DATA(insert ( 7035 25 25 3 s 98 7013 0 ));
DATA(insert ( 7035 25 25 4 s 667 7013 0 ));
DATA(insert ( 7035 25 25 5 s 666 7013 0 ));
/*
* time
*/
DATA(insert ( 7036 1083 1083 1 s 1110 7013 0 ));
DATA(insert ( 7036 1083 1083 2 s 1111 7013 0 ));
DATA(insert ( 7036 1083 1083 3 s 1108 7013 0 ));
DATA(insert ( 7036 1083 1083 4 s 1113 7013 0 ));
DATA(insert ( 7036 1083 1083 5 s 1112 7013 0 ));
/*
* timestamptz
*/
DATA(insert ( 7037 1184 1184 1 s 1322 7013 0 ));
DATA(insert ( 7037 1184 1184 2 s 1323 7013 0 ));
DATA(insert ( 7037 1184 1184 3 s 1320 7013 0 ));
DATA(insert ( 7037 1184 1184 4 s 1325 7013 0 ));
DATA(insert ( 7037 1184 1184 5 s 1324 7013 0 ));
/*
* timestamptz-date
*/
DATA(insert ( 7037 1184 1082 1 s 2384 7013 0 ));
DATA(insert ( 7037 1184 1082 2 s 2385 7013 0 ));
DATA(insert ( 7037 1184 1082 3 s 2386 7013 0 ));
DATA(insert ( 7037 1184 1082 4 s 2387 7013 0 ));
DATA(insert ( 7037 1184 1082 5 s 2388 7013 0 ));
/*
* timestamptz-timestamp
*/
DATA(insert ( 7037 1184 1114 1 s 2540 7013 0 ));
DATA(insert ( 7037 1184 1114 2 s 2541 7013 0 ));
DATA(insert ( 7037 1184 1114 3 s 2542 7013 0 ));
DATA(insert ( 7037 1184 1114 4 s 2543 7013 0 ));
DATA(insert ( 7037 1184 1114 5 s 2544 7013 0 ));
/*
* timetz
*/
DATA(insert ( 7038 1266 1266 1 s 1552 7013 0 ));
DATA(insert ( 7038 1266 1266 2 s 1553 7013 0 ));
DATA(insert ( 7038 1266 1266 3 s 1550 7013 0 ));
DATA(insert ( 7038 1266 1266 4 s 1555 7013 0 ));
DATA(insert ( 7038 1266 1266 5 s 1554 7013 0 ));
/*
* varbit
*/
DATA(insert ( 7039 1562 1562 1 s 1806 7013 0 ));
DATA(insert ( 7039 1562 1562 2 s 1808 7013 0 ));
DATA(insert ( 7039 1562 1562 3 s 1804 7013 0 ));
DATA(insert ( 7039 1562 1562 4 s 1809 7013 0 ));
DATA(insert ( 7039 1562 1562 5 s 1807 7013 0 ));
/*
* timestamp
*/
DATA(insert ( 7041 1114 1114 1 s 2062 7013 0 ));
DATA(insert ( 7041 1114 1114 2 s 2063 7013 0 ));
DATA(insert ( 7041 1114 1114 3 s 2060 7013 0 ));
DATA(insert ( 7041 1114 1114 4 s 2065 7013 0 ));
DATA(insert ( 7041 1114 1114 5 s 2064 7013 0 ));
/*
* timestamp-date
*/
DATA(insert ( 7041 1114 1082 1 s 2371 7013 0 ));
DATA(insert ( 7041 1114 1082 2 s 2372 7013 0 ));
DATA(insert ( 7041 1114 1082 3 s 2373 7013 0 ));
DATA(insert ( 7041 1114 1082 4 s 2374 7013 0 ));
DATA(insert ( 7041 1114 1082 5 s 2375 7013 0 ));
/*
* timestamp-timestamptz
*/
DATA(insert ( 7041 1114 1184 1 s 2534 7013 0 ));
DATA(insert ( 7041 1114 1184 2 s 2535 7013 0 ));
DATA(insert ( 7041 1114 1184 3 s 2536 7013 0 ));
DATA(insert ( 7041 1114 1184 4 s 2537 7013 0 ));
DATA(insert ( 7041 1114 1184 5 s 2538 7013 0 ));
/*
* text pattern
*/
DATA(insert ( 7042 25 25 1 s 2314 7013 0 ));
DATA(insert ( 7042 25 25 2 s 2315 7013 0 ));
DATA(insert ( 7042 25 25 3 s 98 7013 0 ));
DATA(insert ( 7042 25 25 4 s 2317 7013 0 ));
DATA(insert ( 7042 25 25 5 s 2318 7013 0 ));
/*
* bpchar pattern
*/
DATA(insert ( 7044 1042 1042 1 s 2326 7013 0 ));
DATA(insert ( 7044 1042 1042 2 s 2327 7013 0 ));
DATA(insert ( 7044 1042 1042 3 s 1054 7013 0 ));
DATA(insert ( 7044 1042 1042 4 s 2329 7013 0 ));
DATA(insert ( 7044 1042 1042 5 s 2330 7013 0 ));
/*
* money
*/
DATA(insert ( 7046 790 790 1 s 902 7013 0 ));
DATA(insert ( 7046 790 790 2 s 904 7013 0 ));
DATA(insert ( 7046 790 790 3 s 900 7013 0 ));
DATA(insert ( 7046 790 790 4 s 905 7013 0 ));
DATA(insert ( 7046 790 790 5 s 903 7013 0 ));
/*
* reltime
*/
DATA(insert ( 7047 703 703 1 s 568 7013 0 ));
DATA(insert ( 7047 703 703 2 s 570 7013 0 ));
DATA(insert ( 7047 703 703 3 s 566 7013 0 ));
DATA(insert ( 7047 703 703 4 s 571 7013 0 ));
DATA(insert ( 7047 703 703 5 s 569 7013 0 ));
/*
* tinterval
*/
DATA(insert ( 7048 704 704 1 s 813 7013 0 ));
DATA(insert ( 7048 704 704 2 s 815 7013 0 ));
DATA(insert ( 7048 704 704 3 s 811 7013 0 ));
DATA(insert ( 7048 704 704 4 s 816 7013 0 ));
DATA(insert ( 7048 704 704 5 s 814 7013 0 ));
/*
* hash support for a few built-in datatypes that are missing it in upstream.
*/
......
......@@ -673,55 +673,6 @@ DATA(insert ( 4104 603 603 4 4108 ));
DATA(insert ( 4104 603 603 11 4067 ));
DATA(insert ( 4104 603 603 13 187 ));
/*
* the operator routines for the on-disk bitmap index.
*/
DATA(insert ( 7014 702 702 1 357 )); /* abstime */
DATA(insert ( 7015 2277 2277 1 382 )); /* array */
DATA(insert ( 7016 1560 1560 1 1596 )); /* bit */
DATA(insert ( 7017 16 16 1 1693 )); /* bool */
DATA(insert ( 7018 1042 1042 1 1078 )); /* bpchar */
DATA(insert ( 7019 17 17 1 1954 )); /* bytea */
DATA(insert ( 7020 18 18 1 358 )); /* char */
DATA(insert ( 7022 1082 1082 1 1092 )); /* date */
DATA(insert ( 7022 1082 1114 1 2344 )); /* date-timestamp */
DATA(insert ( 7022 1082 1184 1 2357 )); /* date-timestamptz */
DATA(insert ( 7023 700 700 1 354 )); /* float4 */
DATA(insert ( 7023 700 701 1 2194 )); /* float48 */
DATA(insert ( 7024 701 701 1 355 )); /* float8 */
DATA(insert ( 7024 701 700 1 2195 )); /* float84 */
DATA(insert ( 7025 869 869 1 926 )); /* inet */
DATA(insert ( 7026 21 21 1 350 )); /* int2 */
DATA(insert ( 7026 21 23 1 2190 )); /* int24 */
DATA(insert ( 7026 21 20 1 2192 )); /* int28 */
DATA(insert ( 7027 23 23 1 351 )); /* int4 */
DATA(insert ( 7027 23 20 1 2188 )); /* int48 */
DATA(insert ( 7027 23 21 1 2191 )); /* int42 */
DATA(insert ( 7028 20 20 1 842 )); /* int8 */
DATA(insert ( 7028 20 21 1 2193 )); /* int82 */
DATA(insert ( 7028 20 23 1 2189 )); /* int84 */
DATA(insert ( 7029 1186 1186 1 1315 )); /* interval */
DATA(insert ( 7030 829 829 1 836 )); /* macaddr */
DATA(insert ( 7031 19 19 1 359 )); /* name */
DATA(insert ( 7032 1700 1700 1 1769 )); /* numeric */
DATA(insert ( 7033 26 26 1 356 )); /* oid */
DATA(insert ( 7034 30 30 1 404 )); /* oidvector */
DATA(insert ( 7035 25 25 1 360 )); /* text */
DATA(insert ( 7036 1083 1083 1 1107 )); /* time */
DATA(insert ( 7037 1184 1184 1 1314 )); /* timestamptz */
DATA(insert ( 7037 1184 1082 1 2383 )); /* timestamptz-date */
DATA(insert ( 7037 1184 1114 1 2533 )); /* timestamptz-timestamp */
DATA(insert ( 7038 1266 1266 1 1358 )); /* timetz */
DATA(insert ( 7039 1562 1562 1 1672 )); /* varbit */
DATA(insert ( 7041 1114 1114 1 2045 )); /* timestamp */
DATA(insert ( 7041 1114 1082 1 2370 )); /* timestamp-date */
DATA(insert ( 7041 1114 1184 1 2526 )); /* timestamp-timestamptz */
DATA(insert ( 7042 25 25 1 2166 )); /* text pattern */
DATA(insert ( 7044 1042 1042 1 2180 )); /* bpchar pattern */
DATA(insert ( 7046 790 790 1 377 )); /* money */
DATA(insert ( 7047 703 703 1 380 )); /* reltime */
DATA(insert ( 7048 704 704 1 381 )); /* tinterval */
/*
* hash support for a few built-in datatypes that are missing it in upstream.
*/
......
......@@ -279,44 +279,6 @@ DATA(insert ( 3580 pg_lsn_minmax_ops PGNSP PGUID 4082 3220 t 3220 ));
DATA(insert ( 3580 box_inclusion_ops PGNSP PGUID 4104 603 t 603 ));
/* no brin opclass for the geometric types except box */
/*
* the operators for the on-disk bitmap index.
*/
DATA(insert ( 7013 abstime_ops PGNSP PGUID 7014 702 t 0 ));
DATA(insert ( 7013 array_ops PGNSP PGUID 7015 2277 t 0 ));
DATA(insert ( 7013 bit_ops PGNSP PGUID 7016 1560 t 0 ));
DATA(insert ( 7013 bool_ops PGNSP PGUID 7017 16 t 0 ));
DATA(insert ( 7013 bpchar_ops PGNSP PGUID 7018 1042 t 0 ));
DATA(insert ( 7013 bytea_ops PGNSP PGUID 7019 17 t 0 ));
DATA(insert ( 7013 char_ops PGNSP PGUID 7020 18 t 0 ));
DATA(insert ( 7013 cidr_ops PGNSP PGUID 7025 869 f 0 ));
DATA(insert ( 7013 date_ops PGNSP PGUID 7022 1082 t 0 ));
DATA(insert ( 7013 float4_ops PGNSP PGUID 7023 700 t 0 ));
DATA(insert ( 7013 float8_ops PGNSP PGUID 7024 701 t 0 ));
DATA(insert ( 7013 inet_ops PGNSP PGUID 7025 869 t 0 ));
DATA(insert ( 7013 int2_ops PGNSP PGUID 7026 21 t 0 ));
DATA(insert ( 7013 int4_ops PGNSP PGUID 7027 23 t 0 ));
DATA(insert ( 7013 int8_ops PGNSP PGUID 7028 20 t 0 ));
DATA(insert ( 7013 interval_ops PGNSP PGUID 7029 1186 t 0 ));
DATA(insert ( 7013 macaddr_ops PGNSP PGUID 7030 829 t 0 ));
DATA(insert ( 7013 name_ops PGNSP PGUID 7031 19 t 0 ));
DATA(insert ( 7013 numeric_ops PGNSP PGUID 7032 1700 t 0 ));
DATA(insert ( 7013 oid_ops PGNSP PGUID 7033 26 t 0 ));
DATA(insert ( 7013 oidvector_ops PGNSP PGUID 7034 30 t 0 ));
DATA(insert ( 7013 text_ops PGNSP PGUID 7035 25 t 0 ));
DATA(insert ( 7013 time_ops PGNSP PGUID 7036 1083 t 0 ));
DATA(insert ( 7013 timestamptz_ops PGNSP PGUID 7037 1184 t 0 ));
DATA(insert ( 7013 timetz_ops PGNSP PGUID 7038 1266 t 0 ));
DATA(insert ( 7013 varbit_ops PGNSP PGUID 7039 1562 t 0 ));
DATA(insert ( 7013 varchar_ops PGNSP PGUID 7035 25 f 0 ));
DATA(insert ( 7013 timestamp_ops PGNSP PGUID 7041 1114 t 0 ));
DATA(insert ( 7013 text_pattern_ops PGNSP PGUID 7042 25 f 0 ));
DATA(insert ( 7013 varchar_pattern_ops PGNSP PGUID 7042 25 f 0 ));
DATA(insert ( 7013 bpchar_pattern_ops PGNSP PGUID 7044 1042 f 0 ));
DATA(insert ( 7013 money_ops PGNSP PGUID 7046 790 t 0 ));
DATA(insert ( 7013 reltime_ops PGNSP PGUID 7047 703 t 0 ));
DATA(insert ( 7013 tinterval_ops PGNSP PGUID 7048 704 t 0 ));
/*
* hash support for a few built-in datatypes that are missing it in upstream.
*/
......
......@@ -192,41 +192,6 @@ DATA(insert OID = 4104 ( 3580 box_inclusion_ops PGNSP PGUID ));
DATA(insert OID = 6221 ( 403 complex_ops PGNSP PGUID ));
DATA(insert OID = 6224 ( 405 complex_ops PGNSP PGUID ));
/*
* on-disk bitmap index opfamilies.
*/
DATA(insert OID = 7014 ( 7013 abstime_ops PGNSP PGUID ));
DATA(insert OID = 7015 ( 7013 array_ops PGNSP PGUID ));
DATA(insert OID = 7016 ( 7013 bit_ops PGNSP PGUID ));
DATA(insert OID = 7017 ( 7013 bool_ops PGNSP PGUID ));
DATA(insert OID = 7018 ( 7013 bpchar_ops PGNSP PGUID ));
DATA(insert OID = 7019 ( 7013 bytea_ops PGNSP PGUID ));
DATA(insert OID = 7020 ( 7013 char_ops PGNSP PGUID ));
DATA(insert OID = 7022 ( 7013 date_ops PGNSP PGUID ));
DATA(insert OID = 7023 ( 7013 float4_ops PGNSP PGUID ));
DATA(insert OID = 7024 ( 7013 float8_ops PGNSP PGUID ));
DATA(insert OID = 7025 ( 7013 inet_ops PGNSP PGUID ));
DATA(insert OID = 7026 ( 7013 int2_ops PGNSP PGUID ));
DATA(insert OID = 7027 ( 7013 int4_ops PGNSP PGUID ));
DATA(insert OID = 7028 ( 7013 int8_ops PGNSP PGUID ));
DATA(insert OID = 7029 ( 7013 interval_ops PGNSP PGUID ));
DATA(insert OID = 7030 ( 7013 macaddr_ops PGNSP PGUID ));
DATA(insert OID = 7031 ( 7013 name_ops PGNSP PGUID ));
DATA(insert OID = 7032 ( 7013 numeric_ops PGNSP PGUID ));
DATA(insert OID = 7033 ( 7013 oid_ops PGNSP PGUID ));
DATA(insert OID = 7034 ( 7013 oidvector_ops PGNSP PGUID ));
DATA(insert OID = 7035 ( 7013 text_ops PGNSP PGUID ));
DATA(insert OID = 7036 ( 7013 time_ops PGNSP PGUID ));
DATA(insert OID = 7037 ( 7013 timestamptz_ops PGNSP PGUID ));
DATA(insert OID = 7038 ( 7013 timetz_ops PGNSP PGUID ));
DATA(insert OID = 7039 ( 7013 varbit_ops PGNSP PGUID ));
DATA(insert OID = 7041 ( 7013 timestamp_ops PGNSP PGUID ));
DATA(insert OID = 7042 ( 7013 text_pattern_ops PGNSP PGUID ));
DATA(insert OID = 7044 ( 7013 bpchar_pattern_ops PGNSP PGUID ));
DATA(insert OID = 7046 ( 7013 money_ops PGNSP PGUID ));
DATA(insert OID = 7047 ( 7013 reltime_ops PGNSP PGUID ));
DATA(insert OID = 7048 ( 7013 tinterval_ops PGNSP PGUID ));
/*
* hash support for a few built-in datatypes that are missing it in upstream.
*/
......
......@@ -75,7 +75,7 @@ create table all_legacy_types(
select distkey, distclass from gp_distribution_policy where localoid='all_legacy_types'::regclass;
distkey | distclass
-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 10195 10196 10197 10198 10199 10200 10201 10204 10202 10202 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10217 10218 10218 10219 10220 10220 10222 10224 10225 10226
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 10161 10162 10163 10164 10165 10166 10167 10170 10168 10168 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10183 10184 10184 10185 10186 10186 10188 10190 10191 10192
(1 row)
insert into all_legacy_types values (
......@@ -120,7 +120,7 @@ select gpdp.distkey, gpdp.distclass, pgopc.opcname
where gpdp.localoid='legacy_hashops_ctas'::regclass and pgopc.oid::text = gpdp.distclass::text;
distkey | distclass | opcname
---------+-----------+------------------
1 | 10196 | cdbhash_int4_ops
1 | 10162 | cdbhash_int4_ops
(1 row)
set gp_use_legacy_hashops=off;
......
......@@ -75,7 +75,7 @@ create table all_legacy_types(
select distkey, distclass from gp_distribution_policy where localoid='all_legacy_types'::regclass;
distkey | distclass
-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 10195 10196 10197 10198 10199 10200 10201 10204 10202 10202 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10217 10218 10218 10219 10220 10220 10222 10224 10225 10226
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 10161 10162 10163 10164 10165 10166 10167 10170 10168 10168 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10183 10184 10184 10185 10186 10186 10188 10190 10191 10192
(1 row)
insert into all_legacy_types values (
......
......@@ -1863,16 +1863,25 @@ ORDER BY 1, 2, 3;
4000 | 15 | >
4000 | 16 | @>
4000 | 18 | =
7013 | 1 | *<
7013 | 1 | <
7013 | 1 | <<
7013 | 1 | ~<~
7013 | 2 | *<=
7013 | 2 | <<=
7013 | 2 | <=
7013 | 2 | ~<=~
7013 | 3 | *=
7013 | 3 | =
7013 | 4 | *>=
7013 | 4 | >=
7013 | 4 | >>=
7013 | 4 | ~>=~
7013 | 5 | *>
7013 | 5 | >
7013 | 5 | >>
7013 | 5 | ~>~
(121 rows)
(130 rows)
-- Check that all opclass search operators have selectivity estimators.
-- This is not absolutely required, but it seems a reasonable thing
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册