Quote schema's owner name

When we propogate the schema creation command to data nodes we add schema's
owner name too. Before this patch, we did not quote the owner's name which
causes problems with the names containing characters like '-'.
pull/1938/head
Burak Yucesoy 2017-05-15 03:05:01 +03:00
parent 0225d767dd
commit c13240ad8d
1 changed files with 2 additions and 2 deletions

View File

@ -885,7 +885,7 @@ CreateSchemaDDLCommand(Oid schemaId)
{
char *schemaName = get_namespace_name(schemaId);
StringInfo schemaNameDef = NULL;
char *ownerName = NULL;
const char *ownerName = NULL;
if (strncmp(schemaName, "public", NAMEDATALEN) == 0)
{
@ -893,7 +893,7 @@ CreateSchemaDDLCommand(Oid schemaId)
}
schemaNameDef = makeStringInfo();
ownerName = SchemaOwnerName(schemaId);
ownerName = quote_identifier(SchemaOwnerName(schemaId));
appendStringInfo(schemaNameDef, CREATE_SCHEMA_COMMAND, schemaName, ownerName);
return schemaNameDef->data;