Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uHcgY-00620p-D0 for pgsql-docs@arkaria.postgresql.org; Wed, 21 May 2025 06:12:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uHcgX-003R1c-4q for pgsql-docs@arkaria.postgresql.org; Wed, 21 May 2025 06:12:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uHcgW-003R1U-SH for pgsql-docs@lists.postgresql.org; Wed, 21 May 2025 06:12:12 +0000 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uHcgU-0005Y4-0K for pgsql-docs@lists.postgresql.org; Wed, 21 May 2025 06:12:11 +0000 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5fff52493e0so7456213a12.3 for ; Tue, 20 May 2025 23:12:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1747807928; x=1748412728; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=JH8yCpli5RZsr1zgPowe/LfHBPgo9sDX+oCiMnIPP18=; b=C9YY0hqGpaFG0e8VaGy1GhSijdGgcwLYKu8P9+/fz/6UKYUAuq6ITC3MKANStU8Cay K0Ad0OfTvntOlK//G2U3lMDBIrhZAoqHU1W3kfnda1PzsYvr29u5kDL59yA+yyn7JnH0 3Cfyv46WDRBDiALuS8pyaE4pm4rHsGd8jxbbbHumB68BeTNRRSbnY45veBVITsTHpaqJ T4TFDAlXFB33O0u9UGxcL4u8C4t7qfzb28AqlXHy48NbX4ABHfJt3GUuSAG6sUy8A6eS QKjozBohmanzKItobqcMfjwkI5iJgXnjCOxjnCUjY9jVCjWKXTh+GjnHGsNs3kHkOj5f R7Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747807928; x=1748412728; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=JH8yCpli5RZsr1zgPowe/LfHBPgo9sDX+oCiMnIPP18=; b=raA9yT6Dxb+mDtY+xZgTgRNBr9zg6mkURjAektt5pgkZiso5it6US2GUuFts8MkQ98 dwITEb5BqES6wgRXzTqgtPOEOp/wDTGMyO1DS79qMh/htdkUKW6RcdxcU7LI9Nk3boIo RUEJ6dETrh+a0hCp7OO2QYryZCeWuGE6Kr7vx+aXzQyda+CDlaKs7ByggFV1cP09m6yk iRt9E/K48Lh6xN4bU9Y4pbGKgu6ijnN8fXKowMnfNE6vAFQzOFer+WjMWVlFZQcTLPW+ l+cApRbNUqpbFjVMaHCurBc1ElRL+zNO2xC1ohs/wWprz+LyX3sCdSv9t9ChaE73cnm+ HjnA== X-Forwarded-Encrypted: i=1; AJvYcCWvEgZak7LQ9rptM6iehuNVDJicQl9uKSDvceNyIvQdS/1AO6nO5NOstGXthlQWew9BHet0SU4tEBsc@lists.postgresql.org X-Gm-Message-State: AOJu0YyE/jl29y2qPQt8q4fzoDG6QVcoaqyN6CMoIzL2AmkLaPikU9Vi agQg0XvNlwnb/pUnDoqc9Nhm2Hw7y3lB0S1bFkNWujRfZDMSDzezqb7qGs3DnUSNUHJeJCRj624 7t7vG X-Gm-Gg: ASbGnctawmanMEmZcNefnCwpbWavy5K4OGlAQ0rtpxiQ0QjXQycLFOlRp2y+byf/9CH LssQfJyQcv2ZnJ0y3s0ceSxG99k1PMP5gVfTWAxTBFZBnhp8jNFKLBlfsb7wJg3YFbPnjOk/kgX HnEsfHA0z0w9XHkeL+vsq6JWMfl8YP66R7OR4n5HGd2JUSNh6MylZN46nv9m1WTayB/mxuGYgpf L0rwTZAyVmc2yuRJx+hKfyz724RR6wG0UXfGAHmyR0NIKWSgkh3H7xxA1mTfeRMnggZuoSEsglF s2b2gxKxORlATzN5cn2v+cX3Xwy6q0nGaqXlPal1owjHHnTqCeAGqcNH2trm9G2yVys4HlLzVn9 F X-Google-Smtp-Source: AGHT+IGbtL0R3ToWn/rlQX3dZD8olJ7zjcVgAeN6ic2CRZAFYuCTj89LCLModpFgmkw/CP4ktSn/kA== X-Received: by 2002:a05:6402:35c5:b0:602:29e0:5e36 with SMTP id 4fb4d7f45d1cf-60229e061b2mr2288822a12.0.1747807928316; Tue, 20 May 2025 23:12:08 -0700 (PDT) Received: from laurenz.albe-K4N0CV00F97414D ([41.66.98.31]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6005ae3aed4sm8241823a12.75.2025.05.20.23.12.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 May 2025 23:12:08 -0700 (PDT) Message-ID: <9314cf1402ee27d287b24d3a7622f7dc78d6ea34.camel@cybertec.at> Subject: Re: Postgres jsonb data From: Laurenz Albe To: stephen@infowerks.com, pgsql-docs@lists.postgresql.org Date: Wed, 21 May 2025 08:12:06 +0200 In-Reply-To: <174774849023.1455382.3103677107495562713@wrigleys.postgresql.org> References: <174774849023.1455382.3103677107495562713@wrigleys.postgresql.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.1 (3.56.1-1.fc42) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2025-05-20 at 13:41 +0000, PG Doc comments form wrote: > Page: https://www.postgresql.org/docs/14/datatype-json.html >=20 > Documentation suggests that a json type of null doesn't turn into anythin= g > when read into a jsonb, because the json type of null doesn't correspond = to > the postgres type of NULL. We've found that in fact it's treated the sam= e > as the string "null" - and the documentation probably should reflect this > edge case. I see them treated differently: SELECT 'null'::jsonb IS NULL; ?column?=20 =E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90 f (1 row) Can you show examples of what you mean? Yours, Laurenz Albe