Skip to content

Commit 6e46a0a

Browse files
author
Gil Mizrahi
committed
don't introspect, add to defaults
1 parent 335604b commit 6e46a0a

File tree

9 files changed

+4339
-287
lines changed

9 files changed

+4339
-287
lines changed

crates/configuration/src/version5/introspection.sql

+2-31
Original file line numberDiff line numberDiff line change
@@ -1322,31 +1322,9 @@ WITH
13221322
SELECT
13231323
v ->> 'operatorName' AS operator_name,
13241324
v ->> 'exposedName' AS exposed_name,
1325-
v ->> 'operatorKind' AS operator_kind,
1326-
null as operator_type,
1327-
null as operator_type_name
1325+
v ->> 'operatorKind' AS operator_kind
13281326
FROM
13291327
jsonb_array_elements($4) AS v
1330-
UNION ALL
1331-
SELECT DISTINCT ON (oprname)
1332-
o.oprname AS operator_name,
1333-
o.oprcode::text AS exposed_name,
1334-
'custom' AS operator_kind,
1335-
o.oprleft as operator_type,
1336-
(SELECT typname FROM pg_catalog.pg_type WHERE oid = o.oprleft LIMIT 1) as operator_type_name
1337-
FROM
1338-
pg_operator as o
1339-
WHERE
1340-
o.oprname IS NOT NULL
1341-
AND o.oprcode::text IS NOT NULL
1342-
AND o.oprleft = o.oprright
1343-
AND o.oprresult = (SELECT oid FROM pg_catalog.pg_type WHERE typname = 'bool' LIMIT 1)
1344-
AND NOT EXISTS (
1345-
SELECT 1
1346-
FROM jsonb_array_elements($4) AS v
1347-
WHERE v ->> 'operatorName' = o.oprname
1348-
)
1349-
ORDER BY operator_name, exposed_name
13501328
),
13511329

13521330
-- Constraints are recorded in 'pg_constraint', see
@@ -1517,7 +1495,7 @@ WITH
15171495
WITH
15181496
comparison_infix_operators_mapped AS
15191497
(
1520-
SELECT DISTINCT ON (map.exposed_name, op.*)
1498+
SELECT
15211499
map.exposed_name,
15221500
op.operator_name,
15231501
map.operator_kind,
@@ -1537,13 +1515,6 @@ WITH
15371515
USING (operator_name)
15381516
WHERE
15391517
op.is_infix = 't'
1540-
AND (
1541-
map.operator_type is null
1542-
OR map.operator_type = op.argument1_type
1543-
OR op.argument1_cast_chain LIKE ('% -> ' || map.operator_type_name)
1544-
)
1545-
ORDER BY
1546-
map.exposed_name, op.*
15471518
),
15481519

15491520
comparison_prefix_operators AS

crates/configuration/src/version5/options.rs

+2
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ fn default_introspect_prefix_function_comparison_operators() -> Vec<String> {
155155
"lseg_perp".to_string(),
156156
"network_overlap".to_string(),
157157
"network_sub".to_string(),
158+
"network_subeq".to_string(),
158159
"network_sup".to_string(),
160+
"network_supeq".to_string(),
159161
"on_pb".to_string(),
160162
"on_pl".to_string(),
161163
"on_ppath".to_string(),

static/citus/v5-configuration/configuration.json

+9-79
Original file line numberDiff line numberDiff line change
@@ -954,24 +954,6 @@
954954
"argumentType": "Phone",
955955
"isInfix": false
956956
},
957-
"text_pattern_ge": {
958-
"operatorName": "~>=~",
959-
"operatorKind": "custom",
960-
"argumentType": "Phone",
961-
"isInfix": true
962-
},
963-
"text_pattern_gt": {
964-
"operatorName": "~>~",
965-
"operatorKind": "custom",
966-
"argumentType": "Phone",
967-
"isInfix": true
968-
},
969-
"text_pattern_le": {
970-
"operatorName": "~<=~",
971-
"operatorKind": "custom",
972-
"argumentType": "Phone",
973-
"isInfix": true
974-
},
975957
"ts_match_tt": {
976958
"operatorName": "ts_match_tt",
977959
"operatorKind": "custom",
@@ -1211,24 +1193,6 @@
12111193
"argumentType": "char",
12121194
"isInfix": false
12131195
},
1214-
"text_pattern_ge": {
1215-
"operatorName": "~>=~",
1216-
"operatorKind": "custom",
1217-
"argumentType": "char",
1218-
"isInfix": true
1219-
},
1220-
"text_pattern_gt": {
1221-
"operatorName": "~>~",
1222-
"operatorKind": "custom",
1223-
"argumentType": "char",
1224-
"isInfix": true
1225-
},
1226-
"text_pattern_le": {
1227-
"operatorName": "~<=~",
1228-
"operatorKind": "custom",
1229-
"argumentType": "char",
1230-
"isInfix": true
1231-
},
12321196
"ts_match_tt": {
12331197
"operatorName": "ts_match_tt",
12341198
"operatorKind": "custom",
@@ -2074,28 +2038,10 @@
20742038
"isInfix": true
20752039
},
20762040
"starts_with": {
2077-
"operatorName": "^@",
2078-
"operatorKind": "custom",
2079-
"argumentType": "text",
2080-
"isInfix": true
2081-
},
2082-
"text_pattern_ge": {
2083-
"operatorName": "~>=~",
2084-
"operatorKind": "custom",
2085-
"argumentType": "text",
2086-
"isInfix": true
2087-
},
2088-
"text_pattern_gt": {
2089-
"operatorName": "~>~",
2090-
"operatorKind": "custom",
2091-
"argumentType": "text",
2092-
"isInfix": true
2093-
},
2094-
"text_pattern_le": {
2095-
"operatorName": "~<=~",
2041+
"operatorName": "starts_with",
20962042
"operatorKind": "custom",
20972043
"argumentType": "text",
2098-
"isInfix": true
2044+
"isInfix": false
20992045
},
21002046
"ts_match_tt": {
21012047
"operatorName": "ts_match_tt",
@@ -2504,24 +2450,6 @@
25042450
"argumentType": "varchar",
25052451
"isInfix": false
25062452
},
2507-
"text_pattern_ge": {
2508-
"operatorName": "~>=~",
2509-
"operatorKind": "custom",
2510-
"argumentType": "varchar",
2511-
"isInfix": true
2512-
},
2513-
"text_pattern_gt": {
2514-
"operatorName": "~>~",
2515-
"operatorKind": "custom",
2516-
"argumentType": "varchar",
2517-
"isInfix": true
2518-
},
2519-
"text_pattern_le": {
2520-
"operatorName": "~<=~",
2521-
"operatorKind": "custom",
2522-
"argumentType": "varchar",
2523-
"isInfix": true
2524-
},
25252453
"ts_match_tt": {
25262454
"operatorName": "ts_match_tt",
25272455
"operatorKind": "custom",
@@ -3475,6 +3403,11 @@
34753403
"exposedName": "_lt",
34763404
"operatorKind": "custom"
34773405
},
3406+
{
3407+
"operatorName": "<>",
3408+
"exposedName": "_neq",
3409+
"operatorKind": "custom"
3410+
},
34783411
{
34793412
"operatorName": "!=",
34803413
"exposedName": "_neq",
@@ -3510,11 +3443,6 @@
35103443
"exposedName": "_nsimilar",
35113444
"operatorKind": "custom"
35123445
},
3513-
{
3514-
"operatorName": "<>",
3515-
"exposedName": "_neq",
3516-
"operatorKind": "custom"
3517-
},
35183446
{
35193447
"operatorName": "~~",
35203448
"exposedName": "_like",
@@ -3628,7 +3556,9 @@
36283556
"lseg_perp",
36293557
"network_overlap",
36303558
"network_sub",
3559+
"network_subeq",
36313560
"network_sup",
3561+
"network_supeq",
36323562
"on_pb",
36333563
"on_pl",
36343564
"on_ppath",

static/cockroach/v5-configuration/configuration.json

+7-5
Original file line numberDiff line numberDiff line change
@@ -2956,6 +2956,11 @@
29562956
"exposedName": "_lt",
29572957
"operatorKind": "custom"
29582958
},
2959+
{
2960+
"operatorName": "<>",
2961+
"exposedName": "_neq",
2962+
"operatorKind": "custom"
2963+
},
29592964
{
29602965
"operatorName": "!=",
29612966
"exposedName": "_neq",
@@ -2991,11 +2996,6 @@
29912996
"exposedName": "_nsimilar",
29922997
"operatorKind": "custom"
29932998
},
2994-
{
2995-
"operatorName": "<>",
2996-
"exposedName": "_neq",
2997-
"operatorKind": "custom"
2998-
},
29992999
{
30003000
"operatorName": "~~",
30013001
"exposedName": "_like",
@@ -3109,7 +3109,9 @@
31093109
"lseg_perp",
31103110
"network_overlap",
31113111
"network_sub",
3112+
"network_subeq",
31123113
"network_sup",
3114+
"network_supeq",
31133115
"on_pb",
31143116
"on_pl",
31153117
"on_ppath",

0 commit comments

Comments
 (0)