From 4e66f619b0cacd5179abad0513bcf6b122fbad02 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 7 Oct 2006 22:22:04 +0000 Subject: [PATCH] Fix ancient oversight in psql's \d pattern processing code: when seeing two 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 0b375d1b97a..270e9a87bc8 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -3,7 +3,7 @@ * * Copyright 2000-2002 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.71.2.1 2002/12/21 01:07:21 tgl Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.71.2.2 2006/10/07 22:22:04 tgl Exp $ */ #include "postgres_fe.h" #include "describe.h" @@ -1470,7 +1470,8 @@ processNamePattern(PQExpBuffer buf, const char *pattern, appendPQExpBufferChar(&namebuf, '"'); cp++; } - inquotes = !inquotes; + else + inquotes = !inquotes; cp++; } else if (!inquotes && isupper((unsigned char) *cp)) -- 2.39.5