| От | Tom Lane |
|---|---|
| Тема | Re: Change view definition - do not have to drop it |
| Дата | |
| Msg-id | 16563.1243968475@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Change view definition - do not have to drop it (Emi Lu <emilu@encs.concordia.ca>) |
| Ответы |
Re: Change view definition - do not have to drop it
|
| Список | pgsql-general |
Emi Lu <emilu@encs.concordia.ca> writes:
> Now I need update view1 definition to
> create or replace view view1 as select col1, col2 from new_table;
> However, col1 in new_table is not bpchar. This gives me headache! There
> are tens of dependent views based on view1, so I cannot just drop view1
> and recreate it.
> How I can redefine view1 without dropping it and recreate it?
Cast the new column to bpchar?
If you want to change the output column type of the view, you have to
drop and recreate it.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера