Re: JSON Function Bike Shedding
От | Andrew Dunstan |
---|---|
Тема | Re: JSON Function Bike Shedding |
Дата | |
Msg-id | 511BCDF4.7020905@dunslane.net обсуждение исходный текст |
Ответ на | Re: JSON Function Bike Shedding (David E. Wheeler <david@justatheory.com>) |
Ответы |
Re: JSON Function Bike Shedding
Re: JSON Function Bike Shedding |
Список | pgsql-hackers |
On 02/13/2013 12:07 PM, David E. Wheeler wrote: > On Feb 13, 2013, at 8:36 AM, Andrew Dunstan <andrew@dunslane.net> wrote: > >> I don't have any problem getting rid of the json_ prefixes, except for json_agg which I think should keep it (c.f. string_agg,array_agg). > I think that's an unfortunately naming forced on us by the SQL standard, and it doesn't mean we have to use it anyway. Regardless of that, I'd prefer to be consistent. >> I think Merlin's suggestion if unwrap might be good. Or simply "elements()" might work. > Perhaps unwrap() returns a set and elements() returns an array? Now you're adding functionality. Let's just keep this to the question of names. >> I think this is beyond bikeshedding. Apparently you have missed the existence of json_object_keys(). > Oh, I forgot it returned a set rather than an array. So I suggest: > > values() - Returns an array > keys() - Returns an array > > And: > > unwrap() - Returns a set > skeys() - Returns a set > > Er, okay, so skeys() sucks alongside the others here. If we were to steal from hstore, these would be: > > svals() - Returns a set > skeys() - Returns a set > avals() - Returns an array > akeys() - Returns an array > > I don’t love those, but if we want to follow precedent… Ditto. I think we're a bit late to be adding functionality. cheers andrew
В списке pgsql-hackers по дате отправления: