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

Commitd4ade0b

Browse files
vacuumdb: Schema-qualify operator in catalog query's WHERE clause.
Commit1ab67c9, which modified this catalog query so that itdoesn't return temporary relations, forgot to schema-qualify theoperator. A comment earlier in the function implores us to fullyqualify everything in the query: * Since we execute the constructed query with the default search_path * (which could be unsafe), everything in this query MUST be fully * qualified.This commit fixes that. While at it, add a newline for consistencywith surrounding code.Reviewed-by: Noah MischDiscussion:https://postgr.es/m/ZwQJYcuPPUsF0reU%40nathanBackpatch-through: 12
1 parentb255493 commitd4ade0b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/bin/scripts/vacuumdb.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,8 @@ vacuum_one_database(const ConnParams *cparams,
533533
* Exclude temporary tables, beginning the WHERE clause.
534534
*/
535535
appendPQExpBufferStr(&catalog_query,
536-
" WHERE c.relpersistence != "CppAsString2(RELPERSISTENCE_TEMP));
536+
" WHERE c.relpersistence OPERATOR(pg_catalog.!=) "
537+
CppAsString2(RELPERSISTENCE_TEMP)"\n");
537538

538539

539540
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp