Search Postgresql Archives

Re: Will there be a JSON operator like ->> but returning numeric?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Seamus Abshere <seamus@xxxxxxxxxxx> 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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux