Re: PATCH: make plpgsql IN args mutable (v1) [REVIEW]
От | Andrew Dunstan |
---|---|
Тема | Re: PATCH: make plpgsql IN args mutable (v1) [REVIEW] |
Дата | |
Msg-id | 4AB15C5A.4040305@dunslane.net обсуждение исходный текст |
Ответ на | Re: PATCH: make plpgsql IN args mutable (v1) [REVIEW] (Josh Berkus <josh@agliodbs.com>) |
Список | pgsql-hackers |
Josh Berkus wrote: > Michael, > > >> Have an example at hand? I'd argue that in a case of a function of more >> complexity from a code clarity standpoint you'd want to assign to a new >> variable that describes what the new value reflects. >> > > Depends on what programming language you're used to. For those of us > who do a lot of pass-by-reference in our non-database code, reusing the > IN variable is "natural". I know not being able to is a longstanding > annoyance for me. > > > It's the pass by reference case that would be dangerous, in fact. The fact that in C all function parameters are passed by value (unlike, say, FORTRAN) is what makes it safe to modify them inside the function. Anyway, debates about such thigs tend to get a bit religious. getting more practical, I'm slightly inclined to say Steve Prentice has made a good enough case for doing this. cheers andrew
В списке pgsql-hackers по дате отправления: