Re: pg.dropped - Mailing list pgsql-general

From Greg Smith
Subject Re: pg.dropped
Date
Msg-id 4B4652A2.6020305@2ndquadrant.com
Whole thread Raw
In response to pg.dropped  (Filip Rembiałkowski <plk.zuber@gmail.com>)
List pgsql-general
Filip Rembiałkowski wrote:
> After dropping a column from table, there is still entry in pg_attribute
>
> filip@la_dev=# select * from pg_attribute where attrelid = (select oid
> from pg_class where relname='thetable') order by attnum desc limit 1;
> -[ RECORD 1 ]-+------------------------------
> attrelid      | 4753849
> attname       | ........pg.dropped.69........
> ...
> attisdropped  | t

See that last part?  That's what happens when you drop a
table--"attisdropped" is set to true.  The server can't just delete the
pg_attribute entry altogether for various internal reasons, this is what
it does instead.

> And of course this makes my INSERT not working...

There's obviously something wrong here, but the fact that the
pg_attribute entry is still there (but marked dropped) is a not a direct
cause of your problem.

--
Greg Smith    2ndQuadrant   Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com  www.2ndQuadrant.com


pgsql-general by date:

Previous
From: Chris Ernst
Date:
Subject: Re: PG Index
Next
From: Russell Smith
Date:
Subject: Re: A maybe-bug?