Re: BUG #15247: At 'ALTER TABLE ADD COLUMN fast default' , Set attmissingval to NULL in the pg_attribute, query fail

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org, liguangxian1995(at)gmail(dot)com
Subject: Re: BUG #15247: At 'ALTER TABLE ADD COLUMN fast default' , Set attmissingval to NULL in the pg_attribute, query fail
Date: 2018-06-19 14:23:36
Message-ID: 10837.1529418216@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> writes:
> "PG" == PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> PG> (4) update pg_attribute set attmissingval = NULL where attname = 'b';

> Nobody ever claimed that you could update pg_attribute without crashing
> the server; I can think of half a dozen ways to do it.

Specifically, you broke it by not keeping atthasmissing consistent with
attmissingval. Manually corrupting catalogs like that is not a supported
operation.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2018-06-19 14:34:49 Re: row_to_json(), NULL values, and AS
Previous Message Steven Winfield 2018-06-19 11:28:34 RE: BUG #15248: pg_upgrade fails when a function with an empty search_path is encountered