| От | Chris Boget |
|---|---|
| Тема | Re: Altering Column Date Types |
| Дата | |
| Msg-id | 022f01c2c625$0645ea10$8c01a8c0@ENTROPY обсуждение исходный текст |
| Ответ на | Re: Altering Column Date Types (Aarni Ruuhimäki <aarni.ruuhimaki@kymi.com>) |
| Список | pgsql-novice |
> I use 'pg_dump -c my_db > my_db_dump' and then edit the dump file's CREATE > TABLE statements to change column data-tytes. When done, read or re-create > the db back in with 'cat my_db_dump | psql my_db' > Just make sure your data fits into the new data-type. The only thing that may be problematic with this method is if the table being dumped has some foreign key constraints on it from other tables. So to add on to the above steps, before you dump (or some time before you recreate the table), drop the other constraints, do the above then recreate the other constraints. Pain in the butt, yes, but unless you do this you won't be able to drop the table in the first place. Chris
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера