| От | Craig Servin |
|---|---|
| Тема | Alter table alter column using question |
| Дата | |
| Msg-id | 200604271040.29326.cservin@cromagnon.com обсуждение исходный текст |
| Ответ на | Re: IsDate function in plpgsql (Ketema Harris <ketema@gmail.com>) |
| Список | pgsql-admin |
I have a table called type: type ------- type_id integer tvalue smallint ... .. .. tvalue was a second key on this table which now turns out to be unnecessary. Before I can remove it I need to change the columns which reference it. I wanted to do this with alter table alter column using But the using clause I am using does not work. I think I may just be misunderstanding how this is done, but I could only find a few examples. Here is an example of what I have tried: alter table service.service alter column environment_tvalue type integer using select type.type.type_id where tvalue = environment_tvalue and typeset_id = 1; Does the expression in the using clause have to be a function? Any advice would be appreciated. Thanks, Craig
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера