PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> create table foo(a int);
> DROP TABLE IF EXISTS l_prijscomponent_eenheid CASCADE;
> insert into foo values(1),(2),(3);
> alter table foo add b int not null default 0;
> update pg_attribute set attmissingval = NULL where attname = 'b';
> select b from foo;
This is not a bug. This is a superuser intentionally breaking
the system by corrupting the catalogs. There are any number
of ways to cause trouble with ill-advised manual updates to a
catalog table. Try, eg, "DELETE FROM pg_proc" (... but not in
a database you care about).
regards, tom lane