Re: Changing a varchar(7) domain into text directly in pg_type
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Changing a varchar(7) domain into text directly in pg_type |
| Дата | |
| Msg-id | 1452427.1748442061@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Changing a varchar(7) domain into text directly in pg_type (Richard Zetterberg <richard.zetterberg@googlemail.com>) |
| Список | pgsql-general |
Richard Zetterberg <richard.zetterberg@googlemail.com> writes:
> In my head, this change would be instant and postgres would carry on like
> nothing happened and that the domain always had the type `text`. Is this a
> fools errand? Or could it actually make sense in this situation?
Yeah, I think you can probably get away with this (especially since
you've already tested the effects in a throwaway database, IIUC).
The main thing people tend to forget when doing this sort of manual
catalog surgery is updating pg_depend and/or pg_shdepend. But here
there's nothing to do. Since both varchar and text are undroppable
built-in types, we don't bother to make dependencies on them. And
you're not changing the domain's schema or owner, so its other
dependencies don't need to change.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера