Hi, I want to change the type of a column from VARCHAR(32) to VARCHAR(64) without dropping and recreating the table. Can one give me a hint how I can do this. Thanks Erwin
You can't change it in place safely. But you can use select into syntax with an explicit cast like so: select field1::varchar(64) into newtable from oldtable On Mon, 3 Jun 2002, Erwin Ambrosch wrote: > Hi, > > I want to change the type of a column from VARCHAR(32) to VARCHAR(64) without > dropping and recreating the table. Can one give me a hint how I can do this. > > Thanks Erwin > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly >
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера