Re: Calling json_* functions with JSONB data
От | David G. Johnston |
---|---|
Тема | Re: Calling json_* functions with JSONB data |
Дата | |
Msg-id | CAKFQuwZazz+8YLueMV1p4+RzkaAmGyXyfV2xDjbdC8+hU6eEOQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Calling json_* functions with JSONB data (Jim Nasby <Jim.Nasby@BlueTreble.com>) |
Ответы |
Re: Calling json_* functions with JSONB data
|
Список | pgsql-hackers |
On 5/23/16 11:55 AM, Peter van Hardenberg wrote:Fortunately, this seems quite easy to resolve by taking advantage of our
ability to add json_*(jsonb) form of the functions.
Another issue no one has mentioned is functions that return JSON/JSONB. IMO those should NOT be overloaded, because that will make it very easy to accidentally change from one type to the other without meaning to.
Actually, by definition they cannot be overloaded. A function's signature is derived from its input types only.
"""
The name of the new function must not match any existing function with the same input argument types in the same schema. However, functions of different argument types can share a name (this is called overloading).
"""
Admittedly the absence of "output" is not emphasized but overloading in (most?) languages (small sample size for personal knowledge) is subject to the same restriction.
David J.
В списке pgsql-hackers по дате отправления: