On Wed, Aug 19, 2009 at 6:20 PM, Aras Angelo<araskoktas@gmail.com> wrote: > Im trying to alter a column type from character varying(8) to int. > All the values in the column are numbers but im getting this message > > column "xxxxxx" cannot be cast to type integer > > Dropping and readding the column is an option but downtime is very critical > to us, so i was wondering > if im doing something wrong and i can alter type somehow. alter table xyz alter COLUMN i type int using i::int; Note that this will fail if any of the entries in teh column i are not ints.
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера