On Thu, Feb 22, 2018 at 8:51 AM, Pascal Barbedor <pbarbedor@blset.com> wrote:
Thanks for the answer
Where is this mentioned in the doc ?
Since it is only a key inside the json object which is assigned the null value, does it mean it is impossible to have null values inside the jsonb object ?
The docs don't indicate whether functions are strict or not (nor apparently does psql's \df+)...but the behavior of strict functions is documented (at least in CREATE FUNCTION for when you are creating your own).
It is indeed impossible to place an SQL NULL inside of a json object - you can place a json null inside a json object though - thus you need to convert from SQL NULL to json null explicitly (typically via COALESCE):