How would I store little key-Nr to text lists? - Mailing list pgsql-sql

From Andreas
Subject How would I store little key-Nr to text lists?
Date
Msg-id 4C3827E3.3080408@gmx.net
Whole thread Raw
Responses Re: How would I store little key-Nr to text lists?  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-sql
  Hi

how would I store little key-Nr  to  text  lists?
Like e.g.

colors
1  red
2  green
3  blue

Maybe I later also need to add  4 yellow?

Obviously the numbers are used for foreign keys in data tables and the 
texts appear in selects.
On the other hand users should chose from listboxes in an application so 
I need to be able to read the (key, ext) tupels.

For now I use 2 column tables that in selects get joined to a data table.

Is there a more clever way ?


pgsql-sql by date:

Previous
From: "Davor J."
Date:
Subject: Re: Well-formed SQL check in postgres?
Next
From: Pavel Stehule
Date:
Subject: Re: How would I store little key-Nr to text lists?