File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -53,16 +53,16 @@ IsCatalogTable(List *tables) {
53
53
}
54
54
55
55
static bool
56
- IsPartitionedTable (List *tables ) {
57
- foreach_node (RangeTblEntry, table, tables ) {
58
- if (table ->rtekind == RTE_SUBQUERY) {
59
- /* Check whether the table in the subquery is a partitioned table */
60
- if (IsPartitionedTable (table ->subquery ->rtable )) {
56
+ ContainsPartitionedTable (List *rtes ) {
57
+ foreach_node (RangeTblEntry, rte, rtes ) {
58
+ if (rte ->rtekind == RTE_SUBQUERY) {
59
+ /* Check whether any table in the subquery is a partitioned table */
60
+ if (ContainsPartitionedTable (rte ->subquery ->rtable )) {
61
61
return true ;
62
62
}
63
63
}
64
64
65
- if (table ->relkind == RELKIND_PARTITIONED_TABLE) {
65
+ if (rte ->relkind == RELKIND_PARTITIONED_TABLE) {
66
66
return true ;
67
67
}
68
68
}
@@ -167,7 +167,7 @@ IsAllowedStatement(Query *query, bool throw_error = false) {
167
167
/*
168
168
* When accessing the partitioned table, we temporarily let PG handle it instead of DuckDB.
169
169
*/
170
- if (IsPartitionedTable (query->rtable )) {
170
+ if (ContainsPartitionedTable (query->rtable )) {
171
171
elog (elevel, " DuckDB does not support querying PG partitioned table" );
172
172
return false ;
173
173
}
You can’t perform that action at this time.
0 commit comments