Home > Archive > PostgreSQL Discussion > January 2006 > table is not a table









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author table is not a table
Ilja Golshtein

2006-01-26, 4:56 pm

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

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Tom Lane

2006-01-26, 4:56 pm

"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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Michael Fuhr

2006-01-26, 4:56 pm

On Wed, Jan 25, 2006 at 11:26:39AM -0500, Tom Lane wrote:
> "Ilja Golshtein" <ilejn@yandex.ru> writes:
>
> 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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly

Ilja Golshtein

2006-01-27, 9:23 am

Hi!

>On Wed, Jan 25, 2006 at 11:26:39AM -0500, Tom Lane wrote:

No extra information. Just "ERROR: "ddd" is not a table".
[color=darkred]

Not really.
[color=darkred]

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.
[color=darkred]
>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

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Tom Lane

2006-01-27, 11:23 am

"Ilja Golshtein" <ilejn@yandex.ru> writes:
> 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: DropErrorMsgWrongTyp
e, 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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com