Re: Assert single row returning SQL-standard functions
Vik Fearing <vik@postgresfriends.org>
From: Vik Fearing <vik@postgresfriends.org>
To: Pavel Stehule <pavel.stehule@gmail.com>, Joel Jacobson <joel@compiler.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-08-29T13:47:52Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add error_on_null(), checking if the input is the null value
- 2b75c38b707a 19 (unreleased) landed
-
SQL-standard function body
- e717a9a18b2e 14.0 cited
On 29/08/2025 12:06, Pavel Stehule wrote: > > > I can imagine allowing the NOT NULL flag for functions, and then > the > > result can be checked on NOT NULL value. > > I like the idea of a NOT NULL flag for functions. > What syntax could we image for that? > > > CREATE OR REPLACE FUNCTION foo() RETURNS int NOT NULL AS $$ SELECT 10 > $$ LANGUAGE ... What if the function is supposed to return NULL sometimes? The point here is not the value but the row count. -- Vik Fearing