pg_tables anomalies

From: ribal <na97oribal(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: pg_tables anomalies
Date: 2020-04-10 08:21:32
Message-ID: 1586506892180-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2020-04-10 08:29:24 BUG #16355: (packaging) [pgdg12-source] is used multiple times in /etc/yum.repos.d/pgdg-redhat-all.repo
Previous Message hubert depesz lubaczewski 2020-04-10 08:01:22 Re: Loss of replication after simple misconfiguration