Fix ancient oversight in psql's \d pattern processing code: when seeing two
authorTom Lane <[email protected]>
Sat, 7 Oct 2006 22:21:57 +0000 (22:21 +0000)
committerTom Lane <[email protected]>
Sat, 7 Oct 2006 22:21:57 +0000 (22:21 +0000)
quote chars inside quote marks, should emit one quote *and stay in inquotes
mode*.  No doubt the lack of reports of this have something to do with the
poor documentation of the feature ...

src/bin/psql/describe.c

index e36f924438815505e130a9e997f2efa31f3031a0..53d839c6d6f2184b9dee0cbab142e542084ba07d 100644 (file)
@@ -1673,7 +1673,8 @@ processNamePattern(PQExpBuffer buf, const char *pattern,
                                appendPQExpBufferChar(&namebuf, '"');
                                cp++;
                        }
-                       inquotes = !inquotes;
+                       else
+                               inquotes = !inquotes;
                        cp++;
                }
                else if (!inquotes && isupper((unsigned char) *cp))