Re: Cast jsonb to numeric, int, float, bool - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: Cast jsonb to numeric, int, float, bool
Date
Msg-id ca0bdf99-98a5-3a44-3f49-13941e0634ca@sigaev.ru
Whole thread Raw
In response to Re: Re: Cast jsonb to numeric, int, float, bool  (Aleksander Alekseev <a.alekseev@postgrespro.ru>)
Responses Re: Cast jsonb to numeric, int, float, bool  (Teodor Sigaev <teodor@sigaev.ru>)
List pgsql-hackers
Hi!

I took a look on patch and it seems to me it looks both incomplete and 
oveflowing. It suggests cast from numeric and bool, but for numeric it suggests 
only numeric, int4 and  int8. This choice looks irrational.

I think, it should support from/to numeric/bool/text only. If we want to have 
casts to from numeric to other numeric types then it should be full set (int2, 
int4, int8, float4, float8).



Aleksander Alekseev wrote:
> Hello everyone,
> 
>> Since this patch was updated after being set a Ready for Committer and
>> there appear to be some open questions, I have set it to Needs Review.
> 
> I decided to take a look.
> 
> The patch didn't apply after changes made in fd1a421f, but I fixed that.
> Also there were no tests. I fixed that too.
> 
> I believe it's "Ready for Committer".
> 

-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
                                                    WWW: http://www.sigaev.ru/


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Parallel Aggregates for string_agg and array_agg
Next
From: Nikita Glukhov
Date:
Subject: Re: jsonpath