Re: Lookup tables

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Lookup tables
Date: 2025-02-04 21:44:19
Message-ID: Z6KKM-238qVg7pFi@hermes.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support pgsql-general

Am Tue, Feb 04, 2025 at 10:41:38PM +0100 schrieb Thiemo Kellner:

> >> On 4 Feb 2025, at 18:27, Thiemo Kellner <thiemo(at)gelassene-pferde(dot)biz> wrote:
> >>
> >>  Unless the lookup table is actually a check constraint one can use to populate dropdown boxes in an interface.
> >
> > That is even worse because it ceases being transactional and users might select something different than what they see on the screen.
>
> I might see what you want to point out. E.g. the table is COLOURS. The rec with id 1 is RED, the one with id 2 is BLUE, 3 is GREE and so on. Now you load these values into the dropdown box that sports RED, BLUE, GREE and so on. While someone selects GREE, there is a maintenance release changing GREE to YELLOW. So when that someone sends the selection by id to the backend, not GREE is selected but YELLOW.

Yep, that's what I meant and which I never thought of before.

Karsten
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Michał Kłeczek 2025-02-05 05:44:49 Re: Lookup tables
Previous Message Thiemo Kellner 2025-02-04 21:41:38 Re: Lookup tables

Browse pgsql-general by date

  From Date Subject
Next Message Greg Sabino Mullane 2025-02-04 21:47:02 Re: Understanding ALTER DEFAULT PRIVILEGES Behavior in PostgreSQL
Previous Message Thiemo Kellner 2025-02-04 21:41:38 Re: Lookup tables