mirror of
https://github.com/zebrajr/postgres.git
synced 2025-12-07 12:20:31 +01:00
Add missing NULL terminator to list_SECURITY_LABEL_preposition[].
On the machines I tried this on, pressing TAB after SECURITY LABEL led to
being offered ON and FOR as intended, plus random other keywords (varying
across machines). But if you were a bit more unlucky you'd get a crash,
as reported by nummervet@mail.ru in bug #14019.
Seems to have been an aboriginal error in the SECURITY LABEL patch,
commit 4d355a8336. Hence, back-patch to all supported versions.
There's no bug in HEAD, though, thanks to our recent tab-completion
rewrite.
This commit is contained in:
parent
270d8a12e5
commit
0576de5c73
|
|
@ -2919,7 +2919,7 @@ psql_completion(char *text, int start, int end)
|
||||||
pg_strcasecmp(prev_wd, "LABEL") == 0)
|
pg_strcasecmp(prev_wd, "LABEL") == 0)
|
||||||
{
|
{
|
||||||
static const char *const list_SECURITY_LABEL_preposition[] =
|
static const char *const list_SECURITY_LABEL_preposition[] =
|
||||||
{"ON", "FOR"};
|
{"ON", "FOR", NULL};
|
||||||
|
|
||||||
COMPLETE_WITH_LIST(list_SECURITY_LABEL_preposition);
|
COMPLETE_WITH_LIST(list_SECURITY_LABEL_preposition);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user