Re: full featured alter table?

Поиск
Список
Период
Сортировка
От Reynard Hilman
Тема Re: full featured alter table?
Дата
Msg-id 3EEA045C.9020201@lightsky.com
обсуждение исходный текст
Ответ на Re: full featured alter table?  ("scott.marlowe" <scott.marlowe@ihs.com>)
Ответы Re: full featured alter table?  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Re: full featured alter table?  (weigelt@metux.de)
Re: full featured alter table?  (Tino Wildenhain <tino@wildenhain.de>)
Список pgsql-general
>OK, so how do we handle things like converting a varchar to a timestamp
>with time zone?  What if one of the rows has invalid date syntax?  Do we
>convert the column anyway, or throw the whole change out with an error?
>
being a developer instead of DBA makes me think little about the danger
of losing data when you change column type. But, I think you're right,
very BAD things could happen with your data if the database silently
convert / truncate your data when you change the column type.
As far as I remember when working with Oracle, it allows you to change
the data as long as you don't lose or corrupt your data. So, for
example, changing varchar(20) to varchar(40) should be ok, but the
reverse might not be ok. It'd be nice if it allows you to change the
type from varchar(40) to varchar(20) if you don't have any data that is
larger than varchar(20). I don't know how much complexity that will add,
though. well that's just some idea from me.

- reynard



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

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: How to know what are the current postgresql.conf
Следующее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] SAP and MySQL ... [and Benchmark]