| От | Nabil Sayegh |
|---|---|
| Тема | recursive function needs static variable |
| Дата | |
| Msg-id | 1056506107.3449.61.camel@billy обсуждение исходный текст |
| Ответы |
Re: recursive function needs static variable
|
| Список | pgsql-novice |
Hi all, I just changed connectby() to order siblings and return an additional serial column. Everything is working fine so far, but I think there could be a problem due to the static definition of the serial variable. I need the variable to be static, because the function itself is recursive. What will happen if 2 processes concurrently use the function ? will they conflict ? I guess, that if I set the variable to 1 at each beginning of the function, it will conflict. If I do _not_ reset the serial at each function call, that would lead to an overflow sooner or later. Any idea ? -- e-Trolley Sayegh & John, Nabil Sayegh Tel.: 0700 etrolley /// 0700 38765539 Fax.: +49 69 8299381-8 PGP : http://www.e-trolley.de
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера