hi, I've got use cases like > array_remove(array_agg((a->>'b')::float), NULL) It would be nice to replace (a->>'b')::float with something like > a->^'b' that directly returned a numeric... is that in the cards? Thanks, Seamus -- Seamus Abshere, SCEA https://github.com/seamusabshere
Seamus Abshere <seamus@abshere.net> writes:
> I've got use cases like
>> array_remove(array_agg((a->>'b')::float), NULL)
> It would be nice to replace (a->>'b')::float with something like
>> a->^'b'
> that directly returned a numeric... is that in the cards?
I believe we discussed this, along with variants to return boolean
etc, and concluded that it was not really worth doing. For one
thing, it's hard to see how to pick reasonably mnemonic operator
names. The cast syntax may be a bit more verbose but at least
it's pretty self-documenting.
Of course, you're free to create custom operators or functions
for your own use ...
regards, tom lane
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера