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

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Limit for number of Joins in a View? Version 8.1.4 on Redhat 9
Дата
Msg-id 45CA02E9.1010802@archonet.com
обсуждение исходный текст
Ответ на Re: Limit for number of Joins in a View? Version 8.1.4 on Redhat 9  (MargaretGillon@chromalloy.com)
Список 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 по дате отправления:

Предыдущее
От: Bernd Helmle
Дата:
Сообщение: Re: partitioning / rules - strange behavior
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: partitioning / rules - strange behavior