| От | Jake Franklin |
|---|---|
| Тема | Change column type to numeric |
| Дата | |
| Msg-id | 82b3cc200802101037u691b0d31x38f2b2533ab0fc@mail.gmail.com обсуждение |
| Ответы |
Re: Change column type to numeric
|
| Список | pgsql-general |
Forgive me if this question has an obvious answer, I'm sorta new to posgresql. I have a table that's already populated with quite a bit of records. I'd like to alter a column called "amount" from character varying to numeric, so I don't have to re-load all of my data sets. I've already dropped the column default. When attempting to change the column type, I get: test=# alter table foo alter column amount type numeric(10,2) USING cast(amount AS numeric); ERROR: invalid input syntax for type numeric: "" I'm assuming that it's trying to cast a blank value as numeric and failing. Does anyone know of an easy way to work around this? Thanks! --Jake
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера