Re: add column sillyness

Поиск
Список
Период
Сортировка
От Gaetano Mendola
Тема Re: add column sillyness
Дата
Msg-id 3FD67531.8090900@bigfoot.com
обсуждение исходный текст
Ответ на add column sillyness  (Thomas Zehetbauer <thomasz@hostmaster.org>)
Список pgsql-general
Thomas Zehetbauer wrote:

> Why do I have to use FOUR queries to accomplish the same result I can
> get from MySQL with only ONE query:
>
> alter table users add column $ColumnName text;
> alter table users alter column $ColumnName set default '';
> update users set t_shirt_size='' where $ColumnName is null;
> alter table users alter column $ColumnName set not null;

Wow, that's true!

On MySQL 4.0.16-nt is also possible write:

alter table T1
add CONSTRAINT FK_test foreign key (id)
REFERENCES T2 (id);

that doesn't complain. Unfortunately repeating
the command N times doesn't complain neither.
And the funny here is that FK are not yet supported !


No regards.
Gaetano Mendola







В списке pgsql-general по дате отправления:

Предыдущее
От: "Uwe C. Schroeder"
Дата:
Сообщение: Re: Oracle to PostgreSQL migration
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Determining what a user can access