pg.dropped

From: Filip Rembiałkowski <plk(dot)zuber(at)gmail(dot)com>
To: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: pg.dropped
Date: 2010-01-07 16:22:49
Message-ID: 92869e661001070822n570ecb14kbf5e602fa97c0963@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hi all,

I have a deja vu or I had this very problem before.

Now I use 8.4.2 and it happened again.

After dropping a column from table, there is still entry in pg_attribute

filip(at)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........
atttypid | 0
attstattarget | 0
attlen | 1
attnum | 69
attndims | 0
attcacheoff | -1
atttypmod | -1
attbyval | t
attstorage | p
attalign | c
attnotnull | f
atthasdef | f
attisdropped | t
attislocal | t
attinhcount | 0
attacl | <NULL>

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

INSERT INTO thetable ( ... ) VALUES ( ... );
ERROR: table row type and query-specified row type do not match
DETAIL: Physical storage mismatch on dropped attribute at ordinal position
69.

Any clues / hint how to NEVER get into this again?

TIA.

--
Filip Rembiałkowski
JID,mailto:filip(dot)rembialkowski(at)gmail(dot)com
http://filip.rembialkowski.net/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vincenzo Romano 2010-01-07 16:29:19 Ideas and critics are welcome
Previous Message Adrian von Bidder 2010-01-07 15:27:42 Re: Minimizing disk space

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Tiikkaja 2010-01-07 16:27:15 Re: Testing with concurrent sessions
Previous Message Marko Tiikkaja 2010-01-07 16:13:59 Re: Testing with concurrent sessions