> 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