This is an automated email from the ASF dual-hosted git repository.

reshke pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


The following commit(s) were added to refs/heads/cbdb-postgres-merge by this 
push:
     new cb28adc17ac Fix orca permission checking
cb28adc17ac is described below

commit cb28adc17ac53ae268734d9d98ae179f01b08aa7
Author: reshke <[email protected]>
AuthorDate: Tue Dec 30 20:15:40 2025 +0000

    Fix orca permission checking
    
    Fix obvious bug, which leads to coredump.
    Permission checking still needs to be adjusted to satisfy
    initplan permission checking
---
 src/backend/gpopt/translate/CTranslatorQueryToDXL.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/gpopt/translate/CTranslatorQueryToDXL.cpp 
b/src/backend/gpopt/translate/CTranslatorQueryToDXL.cpp
index 014fd8ba23a..91e8106e60e 100644
--- a/src/backend/gpopt/translate/CTranslatorQueryToDXL.cpp
+++ b/src/backend/gpopt/translate/CTranslatorQueryToDXL.cpp
@@ -862,7 +862,7 @@ CTranslatorQueryToDXL::TranslateInsertQueryToDXL()
                                   GPOS_WSZ_LIT("Inserts with foreign tables"));
        }
        const RTEPermissionInfo *perminfo = gpdb::GetRTEPermissionInfo(
-               m_query->rtable, rte);
+               m_query->rteperminfos, rte);
 
        CDXLTableDescr *table_descr = CTranslatorUtils::GetTableDescr(
                m_mp, m_md_accessor, m_context->m_colid_counter, rte, perminfo, 
m_query_id,
@@ -1188,7 +1188,7 @@ CTranslatorQueryToDXL::TranslateDeleteQueryToDXL()
                                   GPOS_WSZ_LIT("Deletes with foreign tables"));
        }
        const RTEPermissionInfo *perminfo = gpdb::GetRTEPermissionInfo(
-               m_query->rtable, rte);
+               m_query->rteperminfos, rte);
 
        CDXLTableDescr *table_descr = CTranslatorUtils::GetTableDescr(
                m_mp, m_md_accessor, m_context->m_colid_counter, rte, perminfo, 
m_query_id,
@@ -1273,7 +1273,7 @@ CTranslatorQueryToDXL::TranslateUpdateQueryToDXL()
                                   GPOS_WSZ_LIT("Updates with foreign tables"));
        }
        const RTEPermissionInfo *perminfo = gpdb::GetRTEPermissionInfo(
-               m_query->rtable, rte);
+               m_query->rteperminfos, rte);
 
        CDXLTableDescr *table_descr = CTranslatorUtils::GetTableDescr(
                m_mp, m_md_accessor, m_context->m_colid_counter, rte, perminfo, 
m_query_id,
@@ -3266,7 +3266,7 @@ CTranslatorQueryToDXL::TranslateFromClauseToDXL(Node 
*node)
                                           GPOS_WSZ_LIT("WITH ORDINALITY"));
                }
 
-               const RTEPermissionInfo *perminfo = 
gpdb::GetRTEPermissionInfo(m_query->rtable,
+               const RTEPermissionInfo *perminfo = 
gpdb::GetRTEPermissionInfo(m_query->rteperminfos,
                                                                                
                                                                 rte);
 
                switch (rte->rtekind)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to