mirror of https://github.com/citusdata/citus.git
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/1412/head
parent
1b5560b2f7
commit
5a3a32d6df
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue