Re: Sharp edge when dropping columns

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Quentin de Metz <quentin(at)de(dot)me(dot)tz>
Cc: pgsql-novice(at)lists(dot)postgresql(dot)org
Subject: Re: Sharp edge when dropping columns
Date: 2024-03-14 19:01:30
Message-ID: CAKFQuwYWYOu7LsdvD4k5uOgywnTXgfmt0UuSL2uP8=Q6izFqqg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Thu, Mar 14, 2024 at 11:45 AM Quentin de Metz <quentin(at)de(dot)me(dot)tz> wrote:

>
> I found this behavior unexpected.
>

In general it is advisable to rely on documented behaviors rather than
expectations.

https://www.postgresql.org/docs/current/sql-altertable.html

This long-standing behavior seems unlikely to be changed. Preventing the
column from being dropped would in any case be the accepted outcome, not
leaving an index behind that refers to a column that doesn't exist.

David J.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2024-03-14 19:17:12 Re: Sharp edge when dropping columns
Previous Message Quentin de Metz 2024-03-14 18:44:31 Sharp edge when dropping columns