]> granicus.if.org Git - postgresql/commitdiff
Fix glitch recently introduced in psql tab completion.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 31 Mar 2012 15:19:23 +0000 (11:19 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 31 Mar 2012 15:19:23 +0000 (11:19 -0400)
Over-optimization (by me, looks like :-() broke the case of recognizing
a word boundary just before a quoted identifier.  Reported and diagnosed
by Dean Rasheed.

src/bin/psql/tab-complete.c

index 6f481bb24dd40ebc59c1895be0c754a3fa45ea93..975d65584b85adad48677dfac9b23bc4b049167e 100644 (file)
@@ -3595,7 +3595,7 @@ get_previous_words(int point, char **previous_words, int nwords)
                        {
                                if (buf[start] == '"')
                                        inquotes = !inquotes;
-                               else if (!inquotes)
+                               if (!inquotes)
                                {
                                        if (buf[start] == ')')
                                                parentheses++;