Обсуждение: Error while adding a column

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

Error while adding a column

От
"Shoaib Mir"
Дата:
Hi All,

While trying to add a column to the table below. On DESC of the table
I do not see the column name, but on adding it, it complains of it
already being present, and on trying to drop it I get the "ERROR:  cache
lookup failed for attribute 56 of relation 16681:" error.

desc test_users;

                                        Table "test_users"

        Column        |            Type            |
Modifiers                       

-----------------------+-----------------------------+------------------
--------------------------------------

 user_id              | integer                    | not null default
nextval('test_users_seq'::regclass)

 user_active          | boolean                    | not null default
false

pgsql=> ALTER TABLE test_users ADD user_skin VARCHAR(255)
DEFAULT NULL;

ERROR:  column "user_skin" of relation "test_users" already exists

pgsql=> ALTER TABLE test_users DROP user_skin;

ERROR:  cache lookup failed for attribute 56 of relation 16681

Any help will be appreciated ....

/Shoaib