Re: Odd procedure resolution
От | Peter Eisentraut |
---|---|
Тема | Re: Odd procedure resolution |
Дата | |
Msg-id | ea1681c5-57e7-bd8b-8932-3e73acaf37bf@2ndquadrant.com обсуждение исходный текст |
Ответ на | Re: Odd procedure resolution (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Odd procedure resolution
Re: Odd procedure resolution |
Список | pgsql-hackers |
On 5/16/18 15:29, Tom Lane wrote: > My opinion remains unchanged. If you're unhappy about the system > confusing procedure foo(int) and function foo(real), maybe the answer > is to not overload the name "foo" with such enthusiasm. But putting > kluges into (some of) the lookup rules is just going to lead to its > own problems and surprising results. > > In particular, I dislike the idea that this patch would make routine > names appear unique in some cases when they do not in others. > Overloading is complicated/confusing enough without that. I think I have made a mistake here. I was reading in between the lines of a competitor's documentation that they have functions and procedures in different name spaces, which made me re-read the SQL standard, which appears to support that approach. So I'm proposing here a patch to fix that. It is similar to the patch proposed earlier in the thread, but more extensive. One open problem in my patch is that regproc/regprocedure don't have a way to distinguish functions from procedures. Maybe a two-argument version of to_regprocedure? This will also affect psql's \ef function and the like. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Вложения
В списке pgsql-hackers по дате отправления: