How to define fixed validation tables

From: "David A(dot) Cobb" <david(dot)a(dot)cobb(dot)1943(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: How to define fixed validation tables
Date: 2017-12-28 20:09:51
Message-ID: CAM7KwpMZnQBqz7_F+mZj7MO3GXWcV3F6yObpP4xadRFX3Ma35w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

My planned database has a field with a rather small list of valid codes.
I want to include validation in processing inputs, probably with a CHECK
rolecode IN ...something....
The validation table is not intended to be alterable by the user.
As a table it is as simple as (code: CHAR(2), meaning TEXT);
The values should be fixed as part of the definition process.

Please, How-To?
--
David A Cobb, computing dinosaur (Cobol-o-saurus Rex)
--
"I am, by God's grace, a Christian man; by my actions a great sinner" --
Way of a Pilgrim, anon. Russian, R.M.French, tr.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message David G. Johnston 2017-12-28 20:15:52 Re: How to define fixed validation tables
Previous Message Mike 2017-12-27 20:52:23 Re: LibreOffice Base Connect to postgresql