Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2dac382

Browse files
knizhnikkelvich
authored andcommitted
Support case of adding predicate in ALTER INDEX ... WHERE ...
1 parente1ca281 commit2dac382

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/backend/commands/indexcmds.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,9 @@ AlterIndex(Oid indexRelationId, IndexStmt *stmt)
361361
relationName=quote_qualified_identifier(get_namespace_name(namespaceId),
362362
get_rel_name(heapRelationId)),
363363
newIndexPredicate=deparse_expression(stmt->whereClause,deparseCtx, false, false);
364-
oldIndexPredicate=deparse_expression((Node*)make_ands_explicit(indexInfo->ii_Predicate),deparseCtx, false, false);
364+
oldIndexPredicate=indexInfo->ii_Predicate
365+
?deparse_expression((Node*)make_ands_explicit(indexInfo->ii_Predicate),deparseCtx, false, false)
366+
:"true";
365367

366368
SPI_connect();
367369

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp