aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-03-14 11:31:22 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-03-14 11:31:34 -0400
commit13108dd0e245055d9600c932cd9ea72ca7eb8eec (patch)
treebb5b1b8a540608602dd9c71d5115cab25e0db958 /src
parent8857488b64c34c8084a14ebefbd667fd5285d1a8 (diff)
downloadpostgresql-13108dd0e245055d9600c932cd9ea72ca7eb8eec.tar.gz
postgresql-13108dd0e245055d9600c932cd9ea72ca7eb8eec.zip
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 4d355a8336e0f226. Hence, back-patch to all supported versions. There's no bug in HEAD, though, thanks to our recent tab-completion rewrite.
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/tab-complete.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 69d94fc6b98..28a0bb291ce 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -3084,7 +3084,7 @@ psql_completion(const char *text, int start, int end)
pg_strcasecmp(prev_wd, "LABEL") == 0)
{
static const char *const list_SECURITY_LABEL_preposition[] =
- {"ON", "FOR"};
+ {"ON", "FOR", NULL};
COMPLETE_WITH_LIST(list_SECURITY_LABEL_preposition);
}