Re: Assert single row returning SQL-standard functions

From: Vik Fearing <vik(at)postgresfriends(dot)org>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Joel Jacobson <joel(at)compiler(dot)org>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Assert single row returning SQL-standard functions
Date: 2025-08-29 13:47:52
Message-ID: 57c67366-a84f-4636-b783-dfc059107048@postgresfriends.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2025-08-29 13:54:20 Re: bug: virtual generated column can be partition key
Previous Message Sami Imseih 2025-08-29 13:30:06 Re: Improve LWLock tranche name visibility across backends