From 90bf243904441b1a57fb1481c70f639dced6aba4 Mon Sep 17 00:00:00 2001 From: Jason Petersen Date: Thu, 20 Apr 2017 19:16:55 -0600 Subject: [PATCH] Remove Node cast of authrole (now RoleSpec) Rather than Node, the authrole field of CreateSchemaStmt is an actual RoleSpec type. The cast to Node only makes sense before PostgreSQL 10. --- src/backend/distributed/worker/task_tracker_protocol.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/distributed/worker/task_tracker_protocol.c b/src/backend/distributed/worker/task_tracker_protocol.c index d1972b229..9a8d452d6 100644 --- a/src/backend/distributed/worker/task_tracker_protocol.c +++ b/src/backend/distributed/worker/task_tracker_protocol.c @@ -291,13 +291,14 @@ CreateJobSchema(StringInfo schemaName) createSchemaStmt = makeNode(CreateSchemaStmt); createSchemaStmt->schemaname = schemaName->data; - createSchemaStmt->authrole = (Node *) ¤tUserRole; createSchemaStmt->schemaElts = NIL; /* actually create schema with the current user as owner */ #if (PG_VERSION_NUM >= 100000) + createSchemaStmt->authrole = ¤tUserRole; CreateSchemaCommand(createSchemaStmt, queryString, -1, -1); #else + createSchemaStmt->authrole = (Node *) ¤tUserRole; CreateSchemaCommand(createSchemaStmt, queryString); #endif