Onur Tirtir
dc293964bf
Expand target entries with merged array/jsonb subscripting ops into multiple ones
...
When re-writing query tree, postgres combines multiple subscripting
operators referencing to the same attribute into a single `TargetEntry`
by linking `SubscriptingRef` objects to each other via their `refexpr`
fields. (See `rewriteTargetListIU` & `process_matched_tle` functions.)
However, ruleutils function `get_update_query_targetlist_def` doesn't
know how to properly deparse such a `TargetEntry`. As a result, we were
only taking the last set-by-subscript operation into account when
generating the shard query for such an `UPDATE` command.
In postgres, this doesn't cause any problems (e.g.: when generating
definition of a rule based object) since the query-rewrite
transformations aren't performed on the query tree that
`get_update_query_targetlist_def` is expected to process.
For this reason; with this commit, before processing the target entry
list in our ruleutils based deparser, we first expand such target
entries into multiple ones.
To detect such `SubscriptingRef` objects, we also need to investigate
`FieldStore` and `CoerceToDomain` objects as postgres functions
processing `SubscriptingRef` objects do --although they do so for
different purposes. However, given that Citus already doesn't allow
`INSERT/UPDATE` via `FieldStore`, we only do that for `CoerceToDomain`
objects.
2022-02-09 12:53:23 +03:00
Onur Tirtir
181111b84f
Drop ruleutils copied for statistics
2022-01-20 17:28:19 +03:00
Onur Tirtir
7b59295af2
Drop ruleutils copied for triggers
2022-01-20 17:28:19 +03:00
Teja Mupparti
a8348047c5
Pushdown procedures with OUT parameters ( #5348 )
2021-10-11 23:14:36 -07:00
Sait Talha Nisanci
0b67fcf81d
Fix style
2021-09-03 16:09:59 +03:00
Halil Ozan Akgul
5930378f61
Renames shadowing ruleutils_14.c variables
2021-09-03 15:27:25 +03:00
Halil Ozan Akgul
86d9260781
Uses lfirst_node in ruleutils_14.c
...
Relevant PG commit:
2b00db4fb0c7f02f000276bfadaab65a14059168
2021-09-03 15:27:25 +03:00
Halil Ozan Akgul
3b7bcf7555
Adds missing include_out_argument parameter to func_get_detail in ruleutils_14.c
...
Relevant PG commit:
e56bce5d43789cce95d099554ae9593ada92b3b7
2021-09-03 15:27:25 +03:00
Halil Ozan Akgul
2990cfb6c9
Adds SQL-standard function body support to ruleutils_14.c
...
Relevant PG commit:
e717a9a18b2e34c9c40e5259ad4d31cd7e420750
2021-09-03 15:27:25 +03:00
Halil Ozan Akgul
84f0be56c3
Adds EXTRACT cases to get_func_sql_syntax in ruleutils_14.c
...
Relevant PG commit:
a2da77cdb4661826482ebf2ddba1f953bc74afe4
2021-09-03 15:27:25 +03:00
Halil Ozan Akgul
131062d6b5
Removes ModifyTable check from set_deparse_plan in ruleutils_14.c
...
Relevant PG commit:
86dc90056dfdbd9d1b891718d2e5614e3e432f35
2021-09-03 15:27:25 +03:00
Halil Ozan Akgul
f557bae64c
Adds JOIN ... USING alias to ruleutils_14.c
...
Relevant PG commit:
055fee7eb4dcc78e58672aef146334275e1cc40d
2021-09-03 15:27:25 +03:00
Halil Ozan Akgul
c3f0528607
Extends statistics on expressions in ruleutils_14.c
...
Relevant PG commit:
a4d75c86bf15220df22de0a92c819ecef9db3849
2021-09-03 15:27:25 +03:00
Halil Ozan Akgul
af2853d1de
Adds GROUP BY DISTINCT to ruleutils_14.c
...
Relevant PG commit:
be45be9c33a85e72cdaeb9967e9f6d2d00199e09
2021-09-03 15:27:25 +03:00
Halil Ozan Akgul
5bb538543d
Enhances cycle mark values at ruleutils_14.c
...
Relevant PG commit:
f4adc41c4f92cc91d507b19e397140c35bb9fd71
2021-09-03 15:27:25 +03:00
Halil Ozan Akgul
12b3c04fe3
Adds SEARCH and CYCLE clauses to ruleutils_14.c
...
Relevant PG commit:
3696a600e2292d43c00949ddf0352e4ebb487e5b
2021-09-03 15:27:25 +03:00
Halil Ozan Akgul
1174046a33
Adds bytea equivalents of ltrim() and rtrim() to ruleutils_14.c
...
Relevant PG commit:
a6cf3df4ebdcbc7857910a67f259705645383e9f
2021-09-03 15:27:25 +03:00
Halil Ozan Akgul
71691ecf06
Adds HASH_STRINGS flag to ruleutils_14.c
...
Relevant PG commit:
b3817f5f774663d55931dd4fab9c5a94a15ae7ab
2021-09-03 15:27:25 +03:00
Halil Ozan Akgul
e72bd0c1a1
Removes dependency.h from ruleutils_14.c
...
Relevant PG commit:
8b069ef5dca97cd737a5fd64c420df3cd61ec1c9
2021-09-03 15:27:25 +03:00
Halil Ozan Akgul
d4874f5ad2
Removes indexing.h header from ruleutils_14.c
...
Relevant PG commit:
bdc4edbea6fc847f806e1e7118d730e159512bfc
2021-09-03 15:27:25 +03:00
Halil Ozan Akgul
1cb865deb8
Adds SQL syntax function calls related changes to ruleutils_14.c
...
Relevant PG commit:
40c24bfef92530bd846e111c1742c2a54441c62c
2021-09-03 15:27:25 +03:00
Halil Ozan Akgul
b4f76303c6
Updates F_ARRAY_UNNEST to F_UNNEST_ANYARRAY in ruleutils_14.c
...
Relevant PG commit:
8e1f37c07aafd4bb7aa6e1e1982010af11f8b5c7
2021-09-03 15:27:25 +03:00
Halil Ozan Akgul
30f77b29a7
Fixes some appendStringInfos in ruleutils_14.c
...
Relevant PG commit:
110d81728a0a006abcf654543fc15346f8043dc0
2021-09-03 15:27:25 +03:00
Halil Ozan Akgul
69aa240b99
Adds for_each_from to ruleutils_14.c
...
Relevant PG commit:
56fe008996bc1a547ce60c8dddd2ca821cac163e
2021-09-03 15:27:24 +03:00
Halil Ozan Akgul
beb49f0d53
Updates AlternativeSubPlan comment in ruleutils_14.c
...
Relevant PG commit:
41efb8340877e8ffd0023bb6b2ef22ffd1ca014d
2021-09-03 15:27:24 +03:00
Halil Ozan Akgul
e642f6c97f
Removes support for postfix operators from ruleutils_14.c
...
Relevant PG commit:
1ed6b895634ce0dc5fd4bd040e87252b32182cba
2021-09-03 15:27:24 +03:00
Halil Ozan Akgul
a710b3b949
Removes some comments with printf %.*s format from ruleutils_14.c
...
Relevant PG commit:
c410af098c46949e36607eb13689e697fa2def97
2021-09-03 15:27:24 +03:00
Halil Ozan Akgul
e38b75799d
Fixes some indentation in ruleutils_14.c
...
Relevant PG commit:
fa27dd40d5c5f56a1ee837a75c97549e992e32a4
2021-09-03 15:27:24 +03:00
Halil Ozan Akgul
7a27d7cee3
Adds copy of ruleutils_13.c as ruleutils_14.c
2021-09-03 15:27:24 +03:00