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.
pull/1439/head
Jason Petersen 2017-04-20 19:16:55 -06:00
parent c0e2a25d92
commit 90bf243904
No known key found for this signature in database
GPG Key ID: 9F1D3510D110ABA9
1 changed files with 2 additions and 1 deletions

View File

@ -291,13 +291,14 @@ CreateJobSchema(StringInfo schemaName)
createSchemaStmt = makeNode(CreateSchemaStmt);
createSchemaStmt->schemaname = schemaName->data;
createSchemaStmt->authrole = (Node *) &currentUserRole;
createSchemaStmt->schemaElts = NIL;
/* actually create schema with the current user as owner */
#if (PG_VERSION_NUM >= 100000)
createSchemaStmt->authrole = &currentUserRole;
CreateSchemaCommand(createSchemaStmt, queryString, -1, -1);
#else
createSchemaStmt->authrole = (Node *) &currentUserRole;
CreateSchemaCommand(createSchemaStmt, queryString);
#endif