MargaretGillon@chromalloy.com wrote:
> Richard,
> I have a few questions on the domain.
>
> 1) How do I add a domain to an existing table? Can I add it to an existing
> column or do I need to make a new column with the domain and copy the
> existing data into it?
Try ALTER TABLE ... ALTER COLUMN col TYPE ...
http://www.postgresql.org/docs/8.1/static/sql-altertable.html
That basically does all the creating/copying for you.
> 2) What happens to the domain and tables using it if I have to modify the
> domain?
You don't. That's why I said "if you don't change it". Now, you can of
course create a new domain and do the ALTER TABLE thing above. But, if
you plan on changing flags at all regularly, you'll want to use foreign
keys.
--
Richard Huxton
Archonet Ltd