Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tgMIY-009xju-BI for pgsql-general@arkaria.postgresql.org; Fri, 07 Feb 2025 11:13:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tgMIX-000XoQ-F4 for pgsql-general@arkaria.postgresql.org; Fri, 07 Feb 2025 11:13:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tgMIX-000XoH-3b for pgsql-general@lists.postgresql.org; Fri, 07 Feb 2025 11:13:25 +0000 Received: from sm-r-008-dus.org-dns.com ([84.19.1.236]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tgMIU-004M4I-10 for pgsql-general@lists.postgresql.org; Fri, 07 Feb 2025 11:13:24 +0000 Received: from smarthost-dus.org-dns.com (localhost [127.0.0.1]) by smarthost-dus.org-dns.com (Postfix) with ESMTP id 1EA2CA169A for ; Fri, 7 Feb 2025 12:08:02 +0100 (CET) Received: by smarthost-dus.org-dns.com (Postfix, from userid 1001) id 11B5DA164C; Fri, 7 Feb 2025 12:08:02 +0100 (CET) X-Spam-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_INFOUSMEBIZ, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 Received: from ha01s018.org-dns.com (ha01s018.org-dns.com [62.108.32.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smarthost-dus.org-dns.com (Postfix) with ESMTPS id C4BC4A1699 for ; Fri, 7 Feb 2025 12:08:01 +0100 (CET) Authentication-Results: ha01s018.org-dns.com; spf=pass (sender IP is 146.185.68.202) smtp.mailfrom=thiemo@gelassene-pferde.biz smtp.helo=dummy.faircode.eu Received-SPF: pass (ha01s018.org-dns.com: connection is authenticated) Date: Fri, 7 Feb 2025 12:07:56 +0100 (GMT+01:00) From: Thiemo Kellner To: "pgsql-generallists.postgresql.org" Message-ID: In-Reply-To: <20250206210318.kj2j5dvliidpmesy@hjp.at> References: <628D4022-5365-4D00-810B-10349A90874A@kleczek.org> <64603f36-b6d5-469b-8d6d-30376842241b@gelassene-pferde.biz> <20250206210318.kj2j5dvliidpmesy@hjp.at> Subject: Re: Lookup tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Correlation-ID: X-PPP-Message-ID: <173892648154.1634118.11265117567969958493@ha01s018.org-dns.com> X-PPP-Vhost: gelassene-pferde.biz X-POWERED-BY: wint.global - AV:CLEAN SPAM:OK List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 06.02.2025 22:04:34 Peter J. Holzer : >> 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. > > I fail to see why use of a surrogate key is the problem here. It seems I did not make mys of clear. I don't see either and don' remember an occasion in over 20 years of DWH business the use of surrogates was a problem. > Either changing the color from GREE to YELLOW makes sense or it doesn't. Hear, hear. > If it doesn't make sense, then it's release which is faulty, not the > model. ACK Thiemo