Re: Cache lookup error when using jsonb, json_build_object and a WITH clause

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cache lookup error when using jsonb, json_build_object and a WITH clause
Date: 2014-05-09 14:31:37
Message-ID: 536CE6C9.1060108@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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 typcategory at all.
>
> So we need to:
>
> 1. Refactor so there's only one copy of the control logic.
>
> 2. Smash domains to their base types.
>
> 3. Identify boolean, numeric, and json types by direct tests of type OID.
>
> 4. Identify array and composite types using standard methods.
>
> Anybody see other problems to fix here?

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 should probably go
back that far.

I was aware of the domain problem, but in 2 years or so nobody has
complained about it, so I guess nobody is defining domains over json.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-05-09 14:32:01 Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)
Previous Message Bruce Momjian 2014-05-09 14:26:48 Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)