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

Commit5c1ce1b

Browse files
Remove tab completion for CREATE UNLOGGED MATERIALIZED VIEW.
Commit3bf3ab8 added support for unlogged materialized views,but commit3223b25 reverted that feature before it made it intoa release. However, the latter commit left the grammar andtab-completion support intact. This commit removes thetab-completion support to prevent psql from recommending boguscommands. I've opted to keep the grammar support so that theserver continues to emit a descriptive error when users try tocreate unlogged matviews.Reported-by: Daniel Westermann, px shiAuthor: Dagfinn Ilmari MannsåkerDiscussion:https://postgr.es/m/ZR0P278MB092093E92263DE16734208A5D2C59%40ZR0P278MB0920.CHEP278.PROD.OUTLOOK.COMDiscussion:https://postgr.es/m/CAAccyY%2BWg1Z-9tNfSwLmuZVgGOwqU5u1OP-RWcoAr2UZGuvN_w%40mail.gmail.com
1 parent0f12905 commit5c1ce1b

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

‎src/bin/psql/tab-complete.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3267,15 +3267,9 @@ psql_completion(const char *text, int start, int end)
32673267
/* Complete "CREATE TEMP/TEMPORARY" with the possible temp objects */
32683268
elseif (TailMatches("CREATE","TEMP|TEMPORARY"))
32693269
COMPLETE_WITH("SEQUENCE","TABLE","VIEW");
3270-
/* Complete "CREATE UNLOGGED" with TABLE, SEQUENCEorMATVIEW */
3270+
/* Complete "CREATE UNLOGGED" with TABLEorSEQUENCE */
32713271
elseif (TailMatches("CREATE","UNLOGGED"))
3272-
{
3273-
/* but not MATVIEW in CREATE SCHEMA */
3274-
if (HeadMatches("CREATE","SCHEMA"))
3275-
COMPLETE_WITH("TABLE","SEQUENCE");
3276-
else
3277-
COMPLETE_WITH("TABLE","SEQUENCE","MATERIALIZED VIEW");
3278-
}
3272+
COMPLETE_WITH("TABLE","SEQUENCE");
32793273
/* Complete PARTITION BY with RANGE ( or LIST ( or ... */
32803274
elseif (TailMatches("PARTITION","BY"))
32813275
COMPLETE_WITH("RANGE (","LIST (","HASH (");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp