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

chenjinbao1989 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 236341e0388 Fix compile errors for task
236341e0388 is described below

commit 236341e0388937e09394ae4585822df6e863d212
Author: Jinbao Chen <[email protected]>
AuthorDate: Sun Oct 5 18:09:25 2025 +0800

    Fix compile errors for task
---
 src/backend/task/job_metadata.c | 7 ++++---
 src/backend/task/pg_cron.c      | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/backend/task/job_metadata.c b/src/backend/task/job_metadata.c
index e603d5fce52..9344360f392 100644
--- a/src/backend/task/job_metadata.c
+++ b/src/backend/task/job_metadata.c
@@ -26,6 +26,7 @@
 #include "catalog/indexing.h"
 #include "catalog/namespace.h"
 #include "catalog/pg_authid.h"
+#include "catalog/pg_database.h"
 #include "catalog/pg_extension.h"
 #include "catalog/pg_task.h"
 #include "catalog/pg_task_run_history.h"
@@ -204,7 +205,7 @@ ScheduleCronJob(text *scheduleText, text *commandText, text 
*databaseText,
        }
 
        /* ensure the user that is used in the job can connect to the database 
*/
-       aclresult = pg_database_aclcheck(get_database_oid(database_name, false),
+       aclresult = object_aclcheck(DatabaseRelationId , 
get_database_oid(database_name, false),
                                                                         
userIdcheckacl, ACL_CONNECT);
        if (aclresult != ACLCHECK_OK)
                ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
@@ -677,7 +678,7 @@ AlterCronJob(int64 jobId, char *schedule, char *command,
        if (database_name != NULL)
        {
                /* ensure the user that is used in the job can connect to the 
database */
-               aclresult = 
pg_database_aclcheck(get_database_oid(database_name, false),
+               aclresult = object_aclcheck(DatabaseRelationId, 
get_database_oid(database_name, false),
                                                                                
 userIdcheckacl, ACL_CONNECT);
 
                if (aclresult != ACLCHECK_OK)
@@ -790,7 +791,7 @@ ParseSchedule(char *scheduleText)
         */
        if (TryParseInterval(scheduleText, &secondsInterval))
        {
-               entry *schedule = calloc(sizeof(entry), sizeof(char));
+               schedule = (entry *) calloc(sizeof(entry), sizeof(char));
                schedule->secondsInterval = secondsInterval;
                return schedule;
        }
diff --git a/src/backend/task/pg_cron.c b/src/backend/task/pg_cron.c
index ac5cfbe82bc..e7e1633402c 100644
--- a/src/backend/task/pg_cron.c
+++ b/src/backend/task/pg_cron.c
@@ -1920,7 +1920,7 @@ ExecuteSqlString(const char *sql)
                #if PG_VERSION_NUM >= 150000
                        querytree_list = 
pg_analyze_and_rewrite_fixedparams(parsetree, sql, NULL, 0, NULL);
                #elif PG_VERSION_NUM >= 100000
-                       querytree_list = pg_analyze_and_rewrite(parsetree, sql, 
NULL, 0, NULL);
+                       querytree_list = 
pg_analyze_and_rewrite_fixedparams(parsetree, sql, NULL, 0, NULL);
                #else
                        querytree_list = pg_analyze_and_rewrite(parsetree, sql, 
NULL, 0);
                #endif


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

Reply via email to