Skip to content

Commit a68dfa2

Browse files
committed
Remove unnecessary pg_amproc BRIN minmax entries
The BRIN minmax opclasses included amproc entries with mismatching left and right types, but those happen to be unnecessary. The opclasses only need cross-type operators, not cross-type support procedures. Discovered when trying to define equivalent BRIN operator families in an extension. Catversion bump, because of pg_amproc changes. Author: Tomas Vondra Reviewed-by: Alvaro Herrera Discussion: https://postgr.es/m/78c357ab-3395-8433-e7b3-b2cfcc9fdc23%40enterprisedb.com
1 parent 5db1fd7 commit a68dfa2

File tree

2 files changed

+6
-161
lines changed

2 files changed

+6
-161
lines changed

src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/* yyyymmddN */
56-
#define CATALOG_VERSION_NO 202103251
56+
#define CATALOG_VERSION_NO 202103261
5757

5858
#endif

src/include/catalog/pg_amproc.dat

Lines changed: 5 additions & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -843,28 +843,7 @@
843843
amproc => 'brin_minmax_consistent' },
844844
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
845845
amprocrighttype => 'int8', amprocnum => '4', amproc => 'brin_minmax_union' },
846-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
847-
amprocrighttype => 'int2', amprocnum => '1',
848-
amproc => 'brin_minmax_opcinfo' },
849-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
850-
amprocrighttype => 'int2', amprocnum => '2',
851-
amproc => 'brin_minmax_add_value' },
852-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
853-
amprocrighttype => 'int2', amprocnum => '3',
854-
amproc => 'brin_minmax_consistent' },
855-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
856-
amprocrighttype => 'int2', amprocnum => '4', amproc => 'brin_minmax_union' },
857-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
858-
amprocrighttype => 'int4', amprocnum => '1',
859-
amproc => 'brin_minmax_opcinfo' },
860-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
861-
amprocrighttype => 'int4', amprocnum => '2',
862-
amproc => 'brin_minmax_add_value' },
863-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
864-
amprocrighttype => 'int4', amprocnum => '3',
865-
amproc => 'brin_minmax_consistent' },
866-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int8',
867-
amprocrighttype => 'int4', amprocnum => '4', amproc => 'brin_minmax_union' },
846+
868847
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
869848
amprocrighttype => 'int2', amprocnum => '1',
870849
amproc => 'brin_minmax_opcinfo' },
@@ -876,28 +855,7 @@
876855
amproc => 'brin_minmax_consistent' },
877856
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
878857
amprocrighttype => 'int2', amprocnum => '4', amproc => 'brin_minmax_union' },
879-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
880-
amprocrighttype => 'int8', amprocnum => '1',
881-
amproc => 'brin_minmax_opcinfo' },
882-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
883-
amprocrighttype => 'int8', amprocnum => '2',
884-
amproc => 'brin_minmax_add_value' },
885-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
886-
amprocrighttype => 'int8', amprocnum => '3',
887-
amproc => 'brin_minmax_consistent' },
888-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
889-
amprocrighttype => 'int8', amprocnum => '4', amproc => 'brin_minmax_union' },
890-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
891-
amprocrighttype => 'int4', amprocnum => '1',
892-
amproc => 'brin_minmax_opcinfo' },
893-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
894-
amprocrighttype => 'int4', amprocnum => '2',
895-
amproc => 'brin_minmax_add_value' },
896-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
897-
amprocrighttype => 'int4', amprocnum => '3',
898-
amproc => 'brin_minmax_consistent' },
899-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int2',
900-
amprocrighttype => 'int4', amprocnum => '4', amproc => 'brin_minmax_union' },
858+
901859
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
902860
amprocrighttype => 'int4', amprocnum => '1',
903861
amproc => 'brin_minmax_opcinfo' },
@@ -909,28 +867,6 @@
909867
amproc => 'brin_minmax_consistent' },
910868
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
911869
amprocrighttype => 'int4', amprocnum => '4', amproc => 'brin_minmax_union' },
912-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
913-
amprocrighttype => 'int8', amprocnum => '1',
914-
amproc => 'brin_minmax_opcinfo' },
915-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
916-
amprocrighttype => 'int8', amprocnum => '2',
917-
amproc => 'brin_minmax_add_value' },
918-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
919-
amprocrighttype => 'int8', amprocnum => '3',
920-
amproc => 'brin_minmax_consistent' },
921-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
922-
amprocrighttype => 'int8', amprocnum => '4', amproc => 'brin_minmax_union' },
923-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
924-
amprocrighttype => 'int2', amprocnum => '1',
925-
amproc => 'brin_minmax_opcinfo' },
926-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
927-
amprocrighttype => 'int2', amprocnum => '2',
928-
amproc => 'brin_minmax_add_value' },
929-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
930-
amprocrighttype => 'int2', amprocnum => '3',
931-
amproc => 'brin_minmax_consistent' },
932-
{ amprocfamily => 'brin/integer_minmax_ops', amproclefttype => 'int4',
933-
amprocrighttype => 'int2', amprocnum => '4', amproc => 'brin_minmax_union' },
934870

935871
# minmax text
936872
{ amprocfamily => 'brin/text_minmax_ops', amproclefttype => 'text',
@@ -982,18 +918,7 @@
982918
{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4',
983919
amprocrighttype => 'float4', amprocnum => '4',
984920
amproc => 'brin_minmax_union' },
985-
{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4',
986-
amprocrighttype => 'float8', amprocnum => '1',
987-
amproc => 'brin_minmax_opcinfo' },
988-
{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4',
989-
amprocrighttype => 'float8', amprocnum => '2',
990-
amproc => 'brin_minmax_add_value' },
991-
{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4',
992-
amprocrighttype => 'float8', amprocnum => '3',
993-
amproc => 'brin_minmax_consistent' },
994-
{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4',
995-
amprocrighttype => 'float8', amprocnum => '4',
996-
amproc => 'brin_minmax_union' },
921+
997922
{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float8',
998923
amprocrighttype => 'float8', amprocnum => '1',
999924
amproc => 'brin_minmax_opcinfo' },
@@ -1006,18 +931,6 @@
1006931
{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float8',
1007932
amprocrighttype => 'float8', amprocnum => '4',
1008933
amproc => 'brin_minmax_union' },
1009-
{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float8',
1010-
amprocrighttype => 'float4', amprocnum => '1',
1011-
amproc => 'brin_minmax_opcinfo' },
1012-
{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float8',
1013-
amprocrighttype => 'float4', amprocnum => '2',
1014-
amproc => 'brin_minmax_add_value' },
1015-
{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float8',
1016-
amprocrighttype => 'float4', amprocnum => '3',
1017-
amproc => 'brin_minmax_consistent' },
1018-
{ amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float8',
1019-
amprocrighttype => 'float4', amprocnum => '4',
1020-
amproc => 'brin_minmax_union' },
1021934

1022935
# minmax macaddr
1023936
{ amprocfamily => 'brin/macaddr_minmax_ops', amproclefttype => 'macaddr',
@@ -1120,29 +1033,7 @@
11201033
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
11211034
amprocrighttype => 'timestamp', amprocnum => '4',
11221035
amproc => 'brin_minmax_union' },
1123-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
1124-
amprocrighttype => 'timestamptz', amprocnum => '1',
1125-
amproc => 'brin_minmax_opcinfo' },
1126-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
1127-
amprocrighttype => 'timestamptz', amprocnum => '2',
1128-
amproc => 'brin_minmax_add_value' },
1129-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
1130-
amprocrighttype => 'timestamptz', amprocnum => '3',
1131-
amproc => 'brin_minmax_consistent' },
1132-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
1133-
amprocrighttype => 'timestamptz', amprocnum => '4',
1134-
amproc => 'brin_minmax_union' },
1135-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
1136-
amprocrighttype => 'date', amprocnum => '1',
1137-
amproc => 'brin_minmax_opcinfo' },
1138-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
1139-
amprocrighttype => 'date', amprocnum => '2',
1140-
amproc => 'brin_minmax_add_value' },
1141-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
1142-
amprocrighttype => 'date', amprocnum => '3',
1143-
amproc => 'brin_minmax_consistent' },
1144-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamp',
1145-
amprocrighttype => 'date', amprocnum => '4', amproc => 'brin_minmax_union' },
1036+
11461037
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
11471038
amprocrighttype => 'timestamptz', amprocnum => '1',
11481039
amproc => 'brin_minmax_opcinfo' },
@@ -1155,29 +1046,7 @@
11551046
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
11561047
amprocrighttype => 'timestamptz', amprocnum => '4',
11571048
amproc => 'brin_minmax_union' },
1158-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
1159-
amprocrighttype => 'timestamp', amprocnum => '1',
1160-
amproc => 'brin_minmax_opcinfo' },
1161-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
1162-
amprocrighttype => 'timestamp', amprocnum => '2',
1163-
amproc => 'brin_minmax_add_value' },
1164-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
1165-
amprocrighttype => 'timestamp', amprocnum => '3',
1166-
amproc => 'brin_minmax_consistent' },
1167-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
1168-
amprocrighttype => 'timestamp', amprocnum => '4',
1169-
amproc => 'brin_minmax_union' },
1170-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
1171-
amprocrighttype => 'date', amprocnum => '1',
1172-
amproc => 'brin_minmax_opcinfo' },
1173-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
1174-
amprocrighttype => 'date', amprocnum => '2',
1175-
amproc => 'brin_minmax_add_value' },
1176-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
1177-
amprocrighttype => 'date', amprocnum => '3',
1178-
amproc => 'brin_minmax_consistent' },
1179-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'timestamptz',
1180-
amprocrighttype => 'date', amprocnum => '4', amproc => 'brin_minmax_union' },
1049+
11811050
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
11821051
amprocrighttype => 'date', amprocnum => '1',
11831052
amproc => 'brin_minmax_opcinfo' },
@@ -1189,30 +1058,6 @@
11891058
amproc => 'brin_minmax_consistent' },
11901059
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
11911060
amprocrighttype => 'date', amprocnum => '4', amproc => 'brin_minmax_union' },
1192-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
1193-
amprocrighttype => 'timestamp', amprocnum => '1',
1194-
amproc => 'brin_minmax_opcinfo' },
1195-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
1196-
amprocrighttype => 'timestamp', amprocnum => '2',
1197-
amproc => 'brin_minmax_add_value' },
1198-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
1199-
amprocrighttype => 'timestamp', amprocnum => '3',
1200-
amproc => 'brin_minmax_consistent' },
1201-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
1202-
amprocrighttype => 'timestamp', amprocnum => '4',
1203-
amproc => 'brin_minmax_union' },
1204-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
1205-
amprocrighttype => 'timestamptz', amprocnum => '1',
1206-
amproc => 'brin_minmax_opcinfo' },
1207-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
1208-
amprocrighttype => 'timestamptz', amprocnum => '2',
1209-
amproc => 'brin_minmax_add_value' },
1210-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
1211-
amprocrighttype => 'timestamptz', amprocnum => '3',
1212-
amproc => 'brin_minmax_consistent' },
1213-
{ amprocfamily => 'brin/datetime_minmax_ops', amproclefttype => 'date',
1214-
amprocrighttype => 'timestamptz', amprocnum => '4',
1215-
amproc => 'brin_minmax_union' },
12161061

12171062
# minmax interval
12181063
{ amprocfamily => 'brin/interval_minmax_ops', amproclefttype => 'interval',

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy