RE: Tip box on Adding a Column

From: Marcelo Fernandes <marcefern7(at)gmail(dot)com>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: RE: Tip box on Adding a Column
Date: 2024-11-01 23:02:14
Message-ID: CAM2F1VPxGVNnzC19e8VOBsxrF1zSoAsZrF7N=hfZbm+CLn-g_w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2024-11-02 09:41:53 https://www.postgresql.org/docs/current/sql-insert.html
Previous Message Bruce Momjian 2024-11-01 20:38:39 Re: Mistake in statement example