Re: JSON Function Bike Shedding
| От | Andrew Dunstan |
|---|---|
| Тема | Re: JSON Function Bike Shedding |
| Дата | |
| Msg-id | 51214358.6040401@dunslane.net обсуждение исходный текст |
| Ответ на | Re: JSON Function Bike Shedding ("David E. Wheeler" <david@justatheory.com>) |
| Список | pgsql-hackers |
On 02/17/2013 01:19 PM, David E. Wheeler wrote:
> On Feb 17, 2013, at 6:33 AM, Andrew Dunstan <andrew@dunslane.net> wrote:
>
>> No, then we don't have a variadic version. You are going to have to accept that we can't make one function name
coverall of this.
> Well, for me, I would rather specify an array than call a function with a different name. But it’s six of one,
half-dozenof another, really, as long as it all works.
>
>
I am going to go the way that involves the least amount of explicit
casting or array construction. So get_path() stays, but becomes
non-variadic. get() can take an int or variadic text[], so you can do:
get(myjson,0) get(myjson,'f1') get(myjson,'f1','2','f3') get_path(myjson,'{f1,2,f3}')
cheers
andrew
В списке pgsql-hackers по дате отправления: