Re: Document NULL - Mailing list pgsql-hackers

From Marcos Pegoraro
Subject Re: Document NULL
Date
Msg-id CAB-JLwZ=c_voY_Jsrqz1uvfRnSRD-o_iYuDahbpw28JNZVH6Uw@mail.gmail.com
Whole thread Raw
In response to Re: Document NULL  (Álvaro Herrera <alvherre@kurilemu.de>)
List pgsql-hackers
Em ter., 11 de nov. de 2025 às 12:34, Álvaro Herrera <alvherre@kurilemu.de> escreveu:
I have rebased this; here's v9.  I haven't reviewed it in depth, but
intend to give it a read and get it pushed sometime in the
not-too-distant future, so if anybody wants to review it some more, it'd
be appreciated

Maybe this one
<programlisting>
SELECT
 1 + null AS "Add",
 'text' || null AS "Concatenate";
</programlisting>

Would be good to explain about explicit casting, because only Numeric, Text and Boolean will work implicitly.

This ones will work
SELECT
 1 + null AS "Add",
 'text' || null AS "Concatenate",
 false or null AS "BoolOR";

But any other datatype will work only if casted properly
select Current_Date + null::integer;
select jsonb_build_object ('x',5) || null::jsonb

regards
Marcos

pgsql-hackers by date:

Previous
From: "Matheus Alcantara"
Date:
Subject: Re: Include extension path on pg_available_extensions
Next
From: Tom Lane
Date:
Subject: Re: pg_getaddrinfo_all() with hintp=NULL