From a1a0d96927b24eff0c01b1a01be9e45c816b2838 Mon Sep 17 00:00:00 2001 From: tanghy Date: Thu, 22 Apr 2021 21:32:04 +0900 Subject: [PATCH] use pg_strncasecmp to replace strncmp when compare "pg_" diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index c3bd75e797..a6ff9b8683 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -1033,7 +1033,7 @@ static const VersionedQuery Query_for_list_of_subscriptions[] = { }; /* - * This is a list of all "things" in Pgsql, which can show up after CREATE or + * This is a list of all "things" in pgsql, which can show up after CREATE or * DROP; and there is also a query to get a list of them. */ @@ -4502,7 +4502,7 @@ _complete_from_query(const char *simple_query, */ if (strcmp(schema_query->catname, "pg_catalog.pg_class c") == 0 && - strncmp(text, "pg_", 3) != 0) + pg_strncasecmp(text, "pg_", 3) != 0) { appendPQExpBufferStr(&query_buffer, " AND c.relnamespace <> (SELECT oid FROM" -- 2.30.0.windows.2