IGNORE/RESPECT NULLS can be specified for (prokind == 'f').

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: IGNORE/RESPECT NULLS can be specified for (prokind == 'f').
Date: 2026-06-16 05:48:29
Message-ID: CACJufxFnm+Aj2Jyhyd58PtW8e1vTZDKimkZE+MashCPSDKw56Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi.

While reviewing the row pattern recognition,
I noticed that the IGNORE NULLS and RESPECT NULLS clauses can be specified for
normal functions (prokind == 'f').

create or replace function dummy2(int) returns bigint AS $$ BEGIN
RETURN $1; END$$ STABLE LANGUAGE plpgsql;
select dummy2(1) IGNORE NULLS;
select dummy2(1) RESPECT NULLS;

This seems unexpected?

Also https://git.postgresql.org/cgit/postgresql.git/commit/?id=25a30bbd4235a49c854036c84fe90f2bc5a87652
Obviously, RESPECT NULLS and IGNORE NULLS can appear in SELECT query,
since they are dedicated keywords, shouldn't they be mentioned in
select.sgml?

--
jian
https://www.enterprisedb.com/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message solai v 2026-06-16 05:52:26 Re: Preserve index stats during ALTER TABLE ... TYPE ...
Previous Message Henson Choi 2026-06-16 05:32:58 Re: Row pattern recognition