Hello, all,
In a database we are developing, we use keys in several places. For several
reasons (a.o. speed), these have a type of integer. Select- statements
selecting on such a key (e.g. KindID) have a clause like "... where KindID =
3". In this case, the integer value 3 stands for "software". This is not so
very well readable, to my feeling.
Now my question : is there a decent way (e.g. *globally* defined constants,
or defines, or something else) by which we could make the above mentioned
clause sound something like "... where KindID = SOFTWARE". I've read a fair
part of the PostgreSQL documentation now, but haven't seen anything like
this exists (I'm not a 15- year experienced DBA, you see).
My intention is not to change the type of the keys (in this case e.g.
KindID), nor to redefine a constant in every *separate* function or
procedure. Any ideas on how to tackle this problem elegantly ?
TIA,
Philippe Bertin
Software Development Engineer Avionics