Re: Add sanity check for duplicate enum values in GUC definitions

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add sanity check for duplicate enum values in GUC definitions
Date: 2025-12-17 14:51:58
Message-ID: c0584af9-37b9-4ab1-bdfa-d7e52e3d8aba@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 15.12.25 10:16, Chao Li wrote:
> The motivation for this patch comes from my own experience. While
> working on [1]. I added an enum-typed GUC and made a copy-and-paste
> mistake, assigning the same numeric value to two different enum entries.
> This resulted in confusing runtime behavior and cost me about an hour to
> track down.

Why do you assign explicit values at all?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2025-12-17 14:54:32 Re: Buffer locking is special (hints, checksums, AIO writes)
Previous Message Jasper Smit 2025-12-17 14:51:17 Re: Visibility bug in tuple lock