Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: ojford(at)gmail(dot)com
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, ishii(at)postgresql(dot)org, vik(at)postgresfriends(dot)org, pgsql-hackers(at)postgresql(dot)org, andrew(at)tao11(dot)riddles(dot)org(dot)uk, david(at)fetter(dot)org, krasiyan(at)gmail(dot)com
Subject: Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options
Date: 2025-01-21 01:20:53
Message-ID: 20250121.102053.672676546036973208.ishii@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>> No, there needs to be a way for the individual window function to
>> throw error if that's specified for a function that can't handle it.
>> I'm just saying I don't want that to be hard-wired in some centralized
>> spot.
>
> Would it be acceptable to add a bool column to pg_proc, say
> "pronulltreatment"? It would default to false, and an error would be
> thrown if the null clause is specified for a function where it's set
> to false?

It needs lots of work including modifying CREATE FUNCTION
command. Instead you could add an API to WinObject access functions to
export ignore_nulls value. Then let each window function check it. If
the window function should not take IGNORE/RESPECT NULLS option, throw
an error.

Best reagards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dagfinn Ilmari Mannsåker 2025-01-21 01:22:53 Re: pg_createsubscriber TAP test wrapping makes command options hard to read.
Previous Message Andy Fan 2025-01-21 01:09:09 Re: Purpose of wal_init_zero