Re: Casts from jsonb to other types should cope with json null

From: Maxim Orlov <orlovmg(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Maciek Sakrejda <maciek(at)pganalyze(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Casts from jsonb to other types should cope with json null
Date: 2025-01-24 12:56:46
Message-ID: CACG=ezbQLqU9PvHrJHbOf=28sQHhTyMRy_EWF2HE4hX_aoGtSQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 3 Aug 2024 at 23:10, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> It strikes me that there's also a question of whether json::text
> should translate 'null' like this. I'm inclined to think not,
> since json is in some sense a domain over text, but it's certainly
> debatable.
>
I tend to agree with you here about the semantics of such casts. But
consistency and "predictability" of
behaviour for the casts are a bit more important in my view. At least,
based on my experience. So, I'm
for 0002 patch.

--
Best regards,
Maxim Orlov.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2025-01-24 13:00:29 Re: [PATCH] Add get_bytes() and set_bytes() functions
Previous Message Pavel Stehule 2025-01-24 12:48:34 Re: XMLDocument (SQL/XML X030)