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

From: Richard Huxton <dev(at)archonet(dot)com>
To: MargaretGillon(at)chromalloy(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Limit for number of Joins in a View? Version 8.1.4 on Redhat 9
Date: 2007-02-07 16:48:41
Message-ID: 45CA02E9.1010802@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

MargaretGillon(at)chromalloy(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mike 2007-02-07 16:54:58 Service startup - troubleshooting
Previous Message MargaretGillon 2007-02-07 16:35:40 Re: Limit for number of Joins in a View? Version 8.1.4 on Redhat 9