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 1tfKXh-001TNr-JF for pgsql-general@arkaria.postgresql.org; Tue, 04 Feb 2025 15:08:49 +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 1tfKXg-004Sec-Lx for pgsql-general@arkaria.postgresql.org; Tue, 04 Feb 2025 15:08:48 +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 1tfKXg-004SeR-Bn for pgsql-general@lists.postgresql.org; Tue, 04 Feb 2025 15:08:48 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tfKXd-003Fdj-0I for pgsql-general@postgresql.org; Tue, 04 Feb 2025 15:08:48 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 92FAA2A14D6 for ; Tue, 4 Feb 2025 07:08:41 -0800 (PST) Date: Tue, 4 Feb 2025 07:08:41 -0800 (PST) From: Rich Shepard To: pgsql-general Subject: Re: Lookup tables In-Reply-To: Message-ID: References: <4e7a338-c7d3-e944-20bd-a6e346e175c7@appl-ecosys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 4 Feb 2025, David G. Johnston wrote: > The point of a lookup table is to provide a unique list of authoritative > values for some purpose. Kinda like an enum. But having the label serve as > the unique value is reasonable - we only add surrogates for optimization. David, The industrytypes table has 26 rows, the statustypes table has 8 rows. Your explanation suggests that for this database adding a PK to each table adds little, if anything. Regards, Rich