Search Postgresql Archives

Re: Limit for number of Joins in a View? Version 8.1.4 on Redhat 9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



MargaretGillon@xxxxxxxxxxxxxx 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux