Thread: table is not a table
Hello! Could you please help me with an issue I have on a PG installation. The problem is it is impossible to drop any table. Looks like this. == [ilejn@wombat bin]$ ./psql postgres ilejn Welcome to psql 8.1.1, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit postgres=# create table ddd(f1 int4); CREATE TABLE postgres=# drop table ddd; ERROR: "ddd" is not a table postgres=# select * from pg_authid where rolname='ilejn'; rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcatupdate | rolcanlogin | rolconnlimit | rolpassword| rolvaliduntil | rolconfig ---------+----------+------------+---------------+-------------+--------------+-------------+--------------+-------------+---------------+----------- ilejn | t | t | t | t | t | t | -1 | | | (1 row) postgres=# select * from pg_tables where tablename='ddd'; schemaname | tablename | tableowner | tablespace | hasindexes | hasrules | hastriggers ------------+-----------+------------+------------+------------+----------+------------- public | ddd | ilejn | | f | f | f (1 row) postgres=# alter table ddd add column f2 text; ALTER TABLE == There is no magic about 'ddd' - same thing for every table. I can ALTER this 'ddd', I can do any DML, but cannot drop! Any ideas what's wrong with permissions/roles or something? Thanks. -- Best regards Ilja Golshtein
"Ilja Golshtein" <ilejn@yandex.ru> writes: > postgres=# create table ddd(f1 int4); > CREATE TABLE > postgres=# drop table ddd; > ERROR: "ddd" is not a table That's just plain bizarre. Would you try it with \set VERBOSITY verbose so we can see exactly where the error is coming from? Has this installation been working for you before? I'm wondering about a corrupt backend executable file, or some such ... regards, tom lane
On Wed, Jan 25, 2006 at 11:26:39AM -0500, Tom Lane wrote: > "Ilja Golshtein" <ilejn@yandex.ru> writes: > > postgres=# create table ddd(f1 int4); > > CREATE TABLE > > postgres=# drop table ddd; > > ERROR: "ddd" is not a table > > That's just plain bizarre. Would you try it with \set VERBOSITY verbose > so we can see exactly where the error is coming from? > > Has this installation been working for you before? I'm wondering about > a corrupt backend executable file, or some such ... Could a corrupt catalog be responsible? Might a query like the following reveal anything? SELECT c.ctid, c.xmin, c.xmax, c.oid, c.relname, c.relkind, n.ctid, n.xmin, n.xmax, n.oid, n.nspname FROM pg_class AS c LEFT JOIN pg_namespace AS n ON n.oid = c.relnamespace WHERE c.relname ~* '^ddd'; -- Michael Fuhr
Hi! >On Wed, Jan 25, 2006 at 11:26:39AM -0500, Tom Lane wrote: >> "Ilja Golshtein" <ilejn@yandex.ru> writes: >> > postgres=# create table ddd(f1 int4); >> > CREATE TABLE >> > postgres=# drop table ddd; >> > ERROR: "ddd" is not a table >> >> That's just plain bizarre. Would you try it with \set VERBOSITY verbose >> so we can see exactly where the error is coming from? No extra information. Just "ERROR: "ddd" is not a table". >> Has this installation been working for you before? Not really. >> I'm wondering about >> a corrupt backend executable file, or some such ... Looks like. The only special thing (and the only thing to blame) I can imagine about this installation - ICU patch. It was applied without any visible troubles. >Could a corrupt catalog be responsible? I've initialised DB cluster from scratch. Problem exists. >Might a query like the >following reveal anything? > >SELECT c.ctid, c.xmin, c.xmax, c.oid, c.relname, c.relkind, > n.ctid, n.xmin, n.xmax, n.oid, n.nspname >FROM pg_class AS c >LEFT JOIN pg_namespace AS n ON n.oid = c.relnamespace >WHERE c.relname ~* '^ddd'; SELECT c.ctid, c.xmin, c.xmax, c.oid, c.relname, c.relkind, n.ctid, n.xmin, n.xmax, n.oid, n.nspname FROM pg_class AS c LEFT JOIN pg_namespace AS n ON n.oid = c.relnamespace WHERE c.relname ~* '^ddd'; postgres-# postgres-# postgres-# postgres-# ctid | xmin | xmax | oid | relname | relkind | ctid | xmin | xmax | oid | nspname --------+------+------+-------+---------+---------+-------+------+------+------+--------- (5,12) | 621 | 0 | 16386 | ddd | r | (0,6) | 2 | 0 | 2200 | public (1 row) -- Best regards Ilja Golshtein
"Ilja Golshtein" <ilejn@yandex.ru> writes: >> On Wed, Jan 25, 2006 at 11:26:39AM -0500, Tom Lane wrote: > That's just plain bizarre. Would you try it with \set VERBOSITY verbose > so we can see exactly where the error is coming from? > No extra information. Just "ERROR: "ddd" is not a table". Not possible unless you mistyped it. You should get something like regression=# create sequence s; CREATE SEQUENCE regression=# drop table s; ERROR: "s" is not a table HINT: Use DROP SEQUENCE to remove a sequence. regression=# \set VERBOSITY verbose regression=# drop table s; ERROR: 42809: "s" is not a table HINT: Use DROP SEQUENCE to remove a sequence. LOCATION: DropErrorMsgWrongType, utility.c:133 regression=# > The only special thing (and the only thing to blame) > I can imagine about this installation - ICU patch. > It was applied without any visible troubles. Perhaps you messed up the patch, or failed to do a full rebuild after applying it? regards, tom lane