mirror of
https://github.com/postgres/postgres.git
synced 2026-05-19 16:57:03 -04:00
psql: Fix incorrect tab completion after CREATE PUBLICATION ... EXCEPT (...)
Previously, tab completion after EXCEPT (...) always suggested FROM SERVER.
This was correct for IMPORT FOREIGN SCHEMA ... EXCEPT (...), but became
incorrect once commit fd366065e0 added CREATE PUBLICATION ... EXCEPT (...).
This commit updates tab completion so FROM SERVER is no longer suggested
after CREATE PUBLICATION ... EXCEPT (...), while preserving the existing
behavior for IMPORT FOREIGN SCHEMA ... EXCEPT (...).
Author: Vignesh C <vignesh21@gmail.com>
Reviewed-by: Shveta Malik <shveta.malik@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CALDaNm1-Fx6Msw6zcRuSjgQdw6asdTyp2DwP-4TCKGYAT+ndsA@mail.gmail.com
This commit is contained in:
parent
cda0c4c5d6
commit
4e0e1f3b27
1 changed files with 1 additions and 1 deletions
|
|
@ -4900,7 +4900,7 @@ match_previous_words(int pattern_id,
|
|||
else if (Matches("IMPORT", "FOREIGN", "SCHEMA", MatchAny))
|
||||
COMPLETE_WITH("EXCEPT (", "FROM SERVER", "LIMIT TO (");
|
||||
else if (TailMatches("LIMIT", "TO", "(*)") ||
|
||||
TailMatches("EXCEPT", "(*)"))
|
||||
Matches("IMPORT", "FOREIGN", "SCHEMA", MatchAny, "EXCEPT", "(*)"))
|
||||
COMPLETE_WITH("FROM SERVER");
|
||||
else if (TailMatches("FROM", "SERVER", MatchAny))
|
||||
COMPLETE_WITH("INTO");
|
||||
|
|
|
|||
Loading…
Reference in a new issue