Обсуждение: Table exists but can't drop.

Поиск
Список
Период
Сортировка

Table exists but can't drop.

От
"Ridvan Lakas ng Bayan S. Baluyos"
Дата:
Hi all,

I have a weird problem. When I'm describing a table, I can see its table structure. However, when I try to drop/select the table. It says that the table doesn't exist.

I checked the rights of the user and only found out that I only have 2 users for the database. I tried to login as user `postgres` and tried to drop it again. But still it says that the relation doesn't exist.

pos=# begin;
BEGIN
pos=# \d gtmonitor2
       Table "public.gtmonitor2"
  Column   |     Type      | Modifiers
-----------+---------------+-----------
 pos       | integer       | not null
 dt        | date          | not null
 oldgt     | numeric(16,4) | not null
 newgt     | numeric(16,4) | not null
 txnamount | numeric(16,4) | not null
 txncount  | integer       | not null
 zcount    | integer       | not null
 opencount | integer       | not null

pos=# drop table gtmonitor2;
ERROR:  table "gtmonitor2" does not exist
pos=#


What could the problem be?


Thanks in advance!

Ridvan

--
リヅバン バルヨス
ridvan.baluyos@qualservcentral.com
http://ridvan.baluyos.net
http://www.onxiam.com/people/rbaluyos

Registered Linux User #439466
Registered Ubuntu User #16034
Q: Have you heard of the Object-Oriented way to get wealthy?
A: Inheritance.

Re: Table exists but can't drop.

От
Tom Lane
Дата:
"Ridvan Lakas ng Bayan S. Baluyos" <ridvan@baluyos.net> writes:
> I have a weird problem. When I'm describing a table, I can see its table
> structure. However, when I try to drop/select the table. It says that the
> table doesn't exist.

Bizarre.  What PG version is this?  Can you SELECT from that table?
Could we see the results of
    select ctid, xmin, xmax from pg_class where relname = 'gtmonitor2'

            regards, tom lane