Re: maintaining backwards compatibility for to_regclass argument type change from cstring to text
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: maintaining backwards compatibility for to_regclass argument type change from cstring to text |
| Дата | |
| Msg-id | 15698.1480567782@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | maintaining backwards compatibility for to_regclass argument type change from cstring to text (Michael Rasmussen <michaelr@porch.com>) |
| Список | pgsql-general |
Michael Rasmussen <michaelr@porch.com> writes: > I have encountered an issue in testing our upgrade from 9.4.4 to 9.6.1. Per the changes detailed in https://www.postgresql.org/message-id/E1aGVwY-0002Pu-Uk%40gemulon.postgresql.org,the argument types of the to_reg*() functionswere changed from cstring to text. Right. > I am now faced with having to support both 9.4 and 9.6 as we will not be upgrading all servers simultaneously. The solutionI have come up with is to use if-else statements that check the numeric version of the cluster the function is installedon. An example: Personally, I'd try to convert everything to new style, and put a shim function into pre-9.6 deployments only. This seems to work: create function to_regclass(text) returns regclass language sql as 'select to_regclass($1::cstring)'; regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера