On Sun, Oct 11, 2026 at 9:36 AM Richard Guo <[email protected]> wrote:
> I plan to back-patch this to v19 only, after rc1.
Thanks for the patch!
Codex reported that the following INSERT, which previously succeeded, still
fails with this patch. I confirmed the issue. Should we fix this as well?
------------------------------------------
CREATE FUNCTION f(numeric) RETURNS numeric
LANGUAGE sql IMMUTABLE AS 'SELECT $1';
CREATE TABLE t (a numeric(10) NOT NULL);
CREATE UNIQUE INDEX ON t (
NULLIF(f(a), CASE WHEN a IS NULL THEN a END)
);
INSERT INTO t VALUES (1)
ON CONFLICT (NULLIF(f(a), CASE WHEN a IS NULL THEN a END))
DO NOTHING;
------------------------------------------
Regards,
--
Fujii Masao