I'm inserting rows in pg_attribute from a old version of the table. After that, the pg_class.relnatts field is updated with the result of: select count(*) from pg_attribute where attrelid = 167017 and attnum > 0 -- returns 24 So I try do drop the table to see if it works and I get a message like this: An error has occurred: ERROR: invalid attribute number 25 for fase_laudo_apac The curious thing is if I delete or insert another row, the number in the error message is always the actual numbers of rows +1 (as we see above). what is wrong? ----- Marcos Oliveira -- View this message in context: http://postgresql.1045698.n5.nabble.com/corrupted-rows-in-pg-attribute-deleted-tp4775814p4782410.html Sent from the PostgreSQL - admin mailing list archive at Nabble.com. -- Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin