Re: BUG #15579: Adding a column with default from configurationparameter fails on 11.1 - Mailing list pgsql-bugs

From Dmitry Dolgov
Subject Re: BUG #15579: Adding a column with default from configurationparameter fails on 11.1
Date
Msg-id CA+q6zcUHseOR7YGhoTn8Df_HBGUP4jfgmWuCB2vixhtU0=7phQ@mail.gmail.com
Whole thread Raw
In response to BUG #15579: Adding a column with default from configuration parameterfails on 11.1  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
> On Mon, Jan 7, 2019 at 1:33 PM PG Bug reporting form <noreply@postgresql.org> wrote:
>
> Is this a bug or pehaps an intended change? We tried googling but
> didn't find anything which seemed relevant.

Well, I guess it was introduced here [1] for fast ALTER TABLE ADD COLUMN
feature:

    The default expression is evaluated at the time of the ALTER TABLE and the
    result stored in a new column (attmissingval) in pg_attribute

Although I wonder if this case with current_setting was taken into account.
Probably it doesn't make sense to use fast alter table if a table is empty.


[1]: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=16828d5c0273b4fe5f10f42588005f16b415b2d8


pgsql-bugs by date:

Previous
From: Bartosz Polnik
Date:
Subject: Re: BUG #15577: Query returns different results when executedmultiple times
Next
From: a Marath
Date:
Subject: Re: BUG #15572: Misleading message reported by "Drop functionoperation" on DB with functions having same name