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

From: "Joel Jacobson" <joel(at)compiler(dot)org>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] Add error_on_null() to produce an error if the input is null
Date: 2025-08-30 11:49:48
Message-ID: ece8c6d1-2ab1-45d5-ba12-8dec96fc8886@app.fastmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear fellow hackers,

This polymorphic function produces an error if the input value is null,
otherwise it returns the input value unchanged.

This need for this function originates from the discussion
"Assert single row returning SQL-standard functions" [1].

/Joel

[1] https://www.postgresql.org/message-id/flat/9233b657-696f-430f-9557-dc602a2b9e0e%40app.fastmail.com

Attachment Content-Type Size
0001-Add-error_on_null-to-produce-an-error-if-the-input-i.patch application/octet-stream 4.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vik Fearing 2025-08-30 12:52:20 Re: [PATCH] Add error_on_null() to produce an error if the input is null
Previous Message Pavel Stehule 2025-08-30 09:16:36 Re: Assert single row returning SQL-standard functions