Skip to content

Commit e8a4aa8

Browse files
committed
Accept some better suggestions for names
1 parent 75b0af4 commit e8a4aa8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/pgduckdb_hooks.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@ IsCatalogTable(List *tables) {
5353
}
5454

5555
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)) {
6161
return true;
6262
}
6363
}
6464

65-
if (table->relkind == RELKIND_PARTITIONED_TABLE) {
65+
if (rte->relkind == RELKIND_PARTITIONED_TABLE) {
6666
return true;
6767
}
6868
}
@@ -167,7 +167,7 @@ IsAllowedStatement(Query *query, bool throw_error = false) {
167167
/*
168168
* When accessing the partitioned table, we temporarily let PG handle it instead of DuckDB.
169169
*/
170-
if (IsPartitionedTable(query->rtable)) {
170+
if (ContainsPartitionedTable(query->rtable)) {
171171
elog(elevel, "DuckDB does not support querying PG partitioned table");
172172
return false;
173173
}

0 commit comments

Comments
 (0)