Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jMpRe-00075c-EO for pgsql-bugs@arkaria.postgresql.org; Fri, 10 Apr 2020 08:55:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jMpRc-0007v9-Pk for pgsql-bugs@arkaria.postgresql.org; Fri, 10 Apr 2020 08:55:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jMoux-0002qC-2u for pgsql-bugs@lists.postgresql.org; Fri, 10 Apr 2020 08:21:39 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jMous-0007rt-Md for pgsql-bugs@postgresql.org; Fri, 10 Apr 2020 08:21:38 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 372E31C69F179 for ; Fri, 10 Apr 2020 01:21:32 -0700 (MST) Date: Fri, 10 Apr 2020 01:21:32 -0700 (MST) From: ribal To: pgsql-bugs@postgresql.org Message-ID: <1586506892180-0.post@n3.nabble.com> Subject: pg_tables anomalies MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk My environment is Centos 6, Postgre 10.11. pgadmin deleted a table called m_rt_temp. However, it is marked as still present in the catalog tree. So I checked pg_tables. select * from pg_catalog.pg_tables This Table is marked as present. However, if you execute select, alter, drop, insert, update, it is said that it does not exist. But when I create table m_rt_temp It says that it already exists and fails. Another unusual situation select * from pg_catalog.pg_tables where tablename = 'm_rt_temp' select * from pg_catalog.pg_tables where tablename like 'm_%' There is no result in this query, select * from pg_catalog.pg_tables where tablename like '% m_rt_temp%' select * from pg_catalog.pg_tables where tablename like '% m_rt_temp' select * from pg_catalog.pg_tables where tablename like '_m_rt_temp' This query gives the result. I thought 'm' might have a problem SELECT *, ASCII (SUBSTR (tablename, 1,1)) FROM pg_catalog.pg_tables where schemaname = 'public' and tablename like ('% m_rt_temp%') Confirmation result with query The first letter is 109 (0x6d), so 'm' is correct. What should I do in this case? Help -- Sent from: https://www.postgresql-archive.org/PostgreSQL-bugs-f2117394.html