Re: plpgsql.warn_shadow
От | Andrew Dunstan |
---|---|
Тема | Re: plpgsql.warn_shadow |
Дата | |
Msg-id | 531641D5.4070300@dunslane.net обсуждение исходный текст |
Ответ на | Re: plpgsql.warn_shadow (Joel Jacobson <joel@trustly.com>) |
Список | pgsql-hackers |
On 03/04/2014 03:40 PM, Joel Jacobson wrote: > On Tue, Mar 4, 2014 at 8:04 PM, Andrew Dunstan <andrew@dunslane.net> wrote: >> Lots of code quite correctly relies on this, >> including some I have written. > I really cannot see when it would be a good coding practise to do so, > there must be something I don't understand, I would greatly appreciate > if you can give a real-life example of such a PL/pgSQL function. > I can't give you one because it's not mine to share. But I can tell you a couple of ways I have seen it come about. One is when a piece if code is re-used in another function which happens to have a parameter name which is the same. Another is when translating some code and this is the simplest way to do it, with the least effort involved. If I am writing a piece of green fields code, than like you I avoid this. But the vast majority of what I do for people is not green fields code. In any case, it's not our responsibility to enforce a coding standard. That's a management issue, in the end, not a technological issue. cheers andrew
В списке pgsql-hackers по дате отправления: