RE: Tip box on Adding a Column - Mailing list pgsql-docs

From Marcelo Fernandes
Subject RE: Tip box on Adding a Column
Date
Msg-id CAM2F1VPxGVNnzC19e8VOBsxrF1zSoAsZrF7N=hfZbm+CLn-g_w@mail.gmail.com
Whole thread Raw
In response to Tip box on Adding a Column  (Marcelo Fernandes <marcefern7@gmail.com>)
List pgsql-docs
On 2024-11-01 09:25:24, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> We have the ability to store immutable defaults in the catalogue tables and
> "fill in the blanks" from there for any tuples that don't have the new
> column.  Since we only can store 1 value per column, it must be a constant,
> i.e. the same for all rows.

Thanks for clarifying that David. Profiling can be deceiving if you don't
have experience in the code base.

> If timing isn't confirmation enough, try doing the above with: SET
> client_min_messages=debug1;
>
> Only adding column "d" gives you: DEBUG:  rewriting table "t1"

Oh wow, that's a very useful setting to have, thanks for pointing that out too.

Best,
Marcelo



pgsql-docs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Mistake in statement example
Next
From: PG Doc comments form
Date:
Subject: https://www.postgresql.org/docs/current/sql-insert.html