Re: alter table performance

Поиск
Список
Период
Сортировка
От Antonio Goméz Soto
Тема Re: alter table performance
Дата
Msg-id 4B2D4087.7090405@gmail.com
обсуждение исходный текст
Ответ на Re: alter table performance  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: alter table performance  (Jaime Casanova <jcasanov@systemguards.com.ec>)
Re: alter table performance  (Jaime Casanova <jcasanov@systemguards.com.ec>)
Список pgsql-general
Hi,

is there a way in sql to dynamically test for version 7.3, so I can run the

   alter table add column
   update table set column = .. where column IS NULL;
   alter table alter column set not null

on 7.3, and on newer versions:

   alter table add column ... not null default '';

Maybe I can create pg/SQL function, that does this, and remove it
afterwards.
or is there a better way?

Thanks
Antonio

Op 17-12-09 23:46, Tom Lane schreef:
> Thomas Kellerer<spam_eater@gmx.net>  writes:
>
>> What's wrong with:
>> alter table person add column address varchar(64) not null default '';
>>
> This:
>
> regression=# alter table person add column address varchar(64) not null default '';
> ERROR:  Adding columns with defaults is not implemented.
>          Add the column, then use ALTER TABLE SET DEFAULT.
> regression=# \q
>
> This is just one of many many things that could be improved by getting
> off of 7.3.  In general, complaining about performance (or features)
> of a seven-year-old, long since EOL'd release is not a productive use of
> anybody's time.
>
>             regards, tom lane
>


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

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: Charset Win1250 on Windows and Ubuntu
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Charset Win1250 on Windows and Ubuntu