mirror of https://github.com/citusdata/citus.git
CLUSTER ON deparser should consider schemas (#5122)
parent
38c139ba59
commit
87a51ae552
|
@ -882,12 +882,13 @@ pg_get_indexclusterdef_string(Oid indexRelationId)
|
||||||
/* check if the table is clustered on this index */
|
/* check if the table is clustered on this index */
|
||||||
if (indexForm->indisclustered)
|
if (indexForm->indisclustered)
|
||||||
{
|
{
|
||||||
char *tableName = generate_relation_name(tableRelationId, NIL);
|
char *qualifiedRelationName =
|
||||||
|
generate_qualified_relation_name(tableRelationId);
|
||||||
char *indexName = get_rel_name(indexRelationId); /* needs to be quoted */
|
char *indexName = get_rel_name(indexRelationId); /* needs to be quoted */
|
||||||
|
|
||||||
initStringInfo(&buffer);
|
initStringInfo(&buffer);
|
||||||
appendStringInfo(&buffer, "ALTER TABLE %s CLUSTER ON %s",
|
appendStringInfo(&buffer, "ALTER TABLE %s CLUSTER ON %s",
|
||||||
tableName, quote_identifier(indexName));
|
qualifiedRelationName, quote_identifier(indexName));
|
||||||
}
|
}
|
||||||
|
|
||||||
ReleaseSysCache(indexTuple);
|
ReleaseSysCache(indexTuple);
|
||||||
|
|
Loading…
Reference in New Issue