public inbox for [email protected]
help / color / mirror / Atom feedFrom: Rich Shepard <[email protected]>
To: [email protected]
Subject: Re: Lookup tables
Date: Tue, 4 Feb 2025 06:46:41 -0800 (PST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
On Tue, 4 Feb 2025, Rob Sargent wrote:
> I would definitely add an Id for each of the looked up values. The code
> can use the Id (for the join or lookup) and the string value can safely be
> changed (think typo) without ripple effect. It also prevents other tables
> from referencing the lookup witrh bogus values (those not in the lookup
> table)
>
> Unless your lookup tables are huge I would create a new table matching
> your current table but with an identity column and load from you original
> table.
> https://www.postgresql.org/docs/current/ddl-identity-columns.html
Thanks, Rob. Each lookup table has only a very few rows,
I'll make new tables today.
Regards,
Rich
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Lookup tables
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox