]> granicus.if.org Git - postgresql/commitdiff
Fix ancient oversight in psql's \d pattern processing code: when seeing two
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 7 Oct 2006 22:21:57 +0000 (22:21 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
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 39456ec60962ceb0601694aefc7a1a70b6d716d1..df0acafa2107fd13dd5946390cd5ac891d13cdd0 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 2000-2003, PostgreSQL Global Development Group
  *
- * $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.87.2.1 2004/01/11 19:25:44 dennis Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.87.2.2 2006/10/07 22:21:57 tgl Exp $
  */
 #include "postgres_fe.h"
 #include "describe.h"
@@ -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))