psql tab completion bug for ALL IN TABLESPACE - Mailing list pgsql-hackers

From Michael Paquier
Subject psql tab completion bug for ALL IN TABLESPACE
Date
Msg-id CAB7nPqSHDdSwsJqX0d2XzjqOHr==HdWiubCi4L=Zs7YFTUne8w@mail.gmail.com
Whole thread Raw
Responses Re: psql tab completion bug for ALL IN TABLESPACE  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Hi all,

I just bumped into the following thing while looking again at Thomas'
patch for psql tab completion:
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -1040,7 +1040,7 @@ psql_completion(const char *text, int start, int end)
                         pg_strcasecmp(prev5_wd, "IN") == 0 &&
                         pg_strcasecmp(prev4_wd, "TABLESPACE") == 0 &&
                         pg_strcasecmp(prev2_wd, "OWNED") == 0 &&
-                        pg_strcasecmp(prev4_wd, "BY") == 0)
+                        pg_strcasecmp(prev_wd, "BY") == 0)
        {
                COMPLETE_WITH_QUERY(Query_for_list_of_roles);
This should be backpatched, attached is the needed patch.

Regards,
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Error with index on unlogged table
Next
From: Michael Paquier
Date:
Subject: Re: Making tab-complete.c easier to maintain