Re: Why are json <=> jsonb casts marked as explicit-only? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Why are json <=> jsonb casts marked as explicit-only?
Date
Msg-id 16150.1425343009@sss.pgh.pa.us
Whole thread Raw
In response to Re: Why are json <=> jsonb casts marked as explicit-only?  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 03/02/2015 04:26 PM, Tom Lane wrote:
>> Surely they should be assignment level, if not implicit.  I don't
>> really see why I should have to write a cast to assign a json
>> expression result into a jsonb column, in particular.

> Probably an oversight/thinko on the part of everyone involved, me more 
> than most. Possibly too an overabundance of caution.

It'd be fair to be cautious about making them implicit; that could
potentially create ambiguous-function-call problems.  But I have a hard
time seeing a problem with marking them as OK for assignments.

The reason this came up is I was looking at the set of explicit casts we
have, and those two stood out like a sore thumb in terms of the semantic
similarity of the types involved.

If there are not objections, I'll go change this tomorrow or so.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [REVIEW] Re: Compression of full-page-writes
Next
From: Kouhei Kaigai
Date:
Subject: Re: Join push-down support for foreign tables