CLUSTER ON deparser should consider schemas (#5122)

pull/5127/head
Önder Kalacı 2021-07-16 18:13:18 +02:00 committed by GitHub
parent 38c139ba59
commit 87a51ae552
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -882,12 +882,13 @@ pg_get_indexclusterdef_string(Oid indexRelationId)
/* check if the table is clustered on this index */
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 */
initStringInfo(&buffer);
appendStringInfo(&buffer, "ALTER TABLE %s CLUSTER ON %s",
tableName, quote_identifier(indexName));
qualifiedRelationName, quote_identifier(indexName));
}
ReleaseSysCache(indexTuple);