Re: Limit for number of Joins in a View? Version 8.1.4 on Redhat 9 - Mailing list pgsql-general

From Richard Huxton
Subject Re: Limit for number of Joins in a View? Version 8.1.4 on Redhat 9
Date
Msg-id 45CA02E9.1010802@archonet.com
Whole thread Raw
In response to Re: Limit for number of Joins in a View? Version 8.1.4 on Redhat 9  (MargaretGillon@chromalloy.com)
List pgsql-general
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

pgsql-general by date:

Previous
From: Bernd Helmle
Date:
Subject: Re: partitioning / rules - strange behavior
Next
From: Tomas Vondra
Date:
Subject: Re: partitioning / rules - strange behavior