Re: [PATCH] Add error_on_null() to produce an error if the input is null

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Vik Fearing <vik(at)postgresfriends(dot)org>
Cc: Joel Jacobson <joel(at)compiler(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Add error_on_null() to produce an error if the input is null
Date: 2025-10-21 08:16:32
Message-ID: aPdBYG9I4jLFPriT@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Aug 31, 2025 at 04:16:42PM +0200, Vik Fearing wrote:
> Thank you.  Updated.

This one was marked as committer, so I am looking at it.

The original proposal can also be tracked in this message, where you
want to have a trick for SQL bodies to be able to detect if exactly
one row is returned:
https://www.postgresql.org/message-id/de94808d-ed58-4536-9e28-e79b09a534c7@app.fastmail.com

Why not if this simple solution works for you, using error_on_null()
as the function name. I'll double-check the whole, probably tomorrow.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2025-10-21 08:47:30 Re: Invalid primary_slot_name triggers warnings in all processes on reload
Previous Message Álvaro Herrera 2025-10-21 08:05:37 Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part