Andres Freund writes:
>> Anybody see other problems to fix here?
> Yea.
> 5)
> if (val_type > FirstNormalObjectId)
> isn't fundamentally incorrect but imo shouldn't be replaced by something
> like !IsCatalogType() (akin to IsCatalogRelation). At least if we decide
> that hunk is safe from ot
Andrew Dunstan writes:
> I guess this is my fault. I recall some discussions when some of this
> was first being written about the best way to make the type based
> decisions, not sure at this remove whether on list or off. The origin of
> it is in 9.2, so if you're going to adjust it you shoul
On 2014-05-09 10:07:10 -0400, Tom Lane wrote:
> I wrote:
> > Andres Freund writes:
> >> b) datum_to_json() thinks it's a good idea to use typcategory to decide
> >> how a type is output. Isn't that pertty fundamentally flawed?
>
> > Indeed. I think the bit that uses TYPCATEGORY_NUMERIC as a hint
On 05/09/2014 10:07 AM, Tom Lane wrote:
After further reflection I think we should lose the TYPCATEGORY_NUMERIC
business too. ruleutils.c hard-wires the set of types it will consider
to be numeric, and I see no very good reason not to do likewise here.
That will remove the need to look up the t
I wrote:
> Andres Freund writes:
>> b) datum_to_json() thinks it's a good idea to use typcategory to decide
>> how a type is output. Isn't that pertty fundamentally flawed?
> Indeed. I think the bit that uses TYPCATEGORY_NUMERIC as a hint to decide
> whether the value can be left unquoted (assum
Andres Freund writes:
> Whoa. There's two wierd things here:
> a) "jsonb" has a typcategory 'C'. Marking a composite type. "json" has
>'U'.
Yeah, that's flat out wrong. I changed it before seeing your message.
> b) datum_to_json() thinks it's a good idea to use typcategory to decide
>ho
Hi,
On 2014-05-09 21:40:07 +0900, Michael Paquier wrote:
> Hi all,
>
> I found the following error when playing with jsonb and json_build_object:
> =# with jsonb_data as (select * from jsonb_each('{"aa" :
> "po"}'::jsonb)) select json_build_object(key,value) from jsonb_data;
> ERROR: XX000: cach
Michael Paquier writes:
> I found the following error when playing with jsonb and json_build_object:
> =# with jsonb_data as (select * from jsonb_each('{"aa" :
> "po"}'::jsonb)) select json_build_object(key,value) from jsonb_data;
> ERROR: XX000: cache lookup failed for type 2147483650
> LOCATION
Hi all,
I found the following error when playing with jsonb and json_build_object:
=# with jsonb_data as (select * from jsonb_each('{"aa" :
"po"}'::jsonb)) select json_build_object(key,value) from jsonb_data;
ERROR: XX000: cache lookup failed for type 2147483650
LOCATION: lookup_type_cache, typc