Re: Cache lookup error when using jsonb, json_build_object and a WITH clause - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Cache lookup error when using jsonb, json_build_object and a WITH clause
Date
Msg-id 20582.1399650169@sss.pgh.pa.us
Whole thread Raw
In response to Re: Cache lookup error when using jsonb, json_build_object and a WITH clause  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Andres Freund <andres@2ndquadrant.com> 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 other POVs - I am not actually 100% sure yet.

I didn't particularly like that either.  The test is off-by-one, for
one thing (a type created right at OID wraparound could have
FirstNormalObjectId).  However, it seems reasonable to avoid fruitless
syscache searches for builtin types, and I'm not seeing a lot of point
to wrapping this test in some macro.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Cache lookup error when using jsonb, json_build_object and a WITH clause
Next
From: Robert Haas
Date:
Subject: Re: Sending out a request for more buildfarm animals?