postgres.git / summary / log / commit / refs

commit    2d61d88d8d0be910b54d28448e3fc94f94995792
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Mon Mar 14 15:31:22 2016 +0000
First released in: 9.1.21, 9.2.16, 9.3.12, 9.4.7, 9.5.2

    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.


src/bin/psql/tab-complete.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index c4e36313f95..17819a1c6ad 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -2457,7 +2457,7 @@ psql_completion(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); } [parent: 3e6385e27105]