Re: Two issues with REFRESH MATERIALIZED VIEW CONCURRENTLY

From: cca5507 <cca5507(at)qq(dot)com>
To: surya poondla <suryapoondla4(at)gmail(dot)com>, Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com>
Cc: Giuliano Gagliardi <gogi(at)gogi(dot)tv>, pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Two issues with REFRESH MATERIALIZED VIEW CONCURRENTLY
Date: 2026-03-13 07:20:49
Message-ID: tencent_7FA4F0B1D63BE55A8608EFF600CD4E371405@qq.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> I think we might want the "*=" operator treat NULL as not equal to NULL and
> this is why we add "IS NOT NULL" to the duplicate detection query.
>
> Your patch treats NULL as equal to NULL, which is different from the SQL
> standard, may confuse users.
>
> So I think we should make the "*=" operator treat NULL as not equal to NULL
> or add a new operator to implement it. Thoughts?

Attach a patch. I add a new built-in function called record_image_eq_variant
which considers two NULLs not equal so that each row can match at most one
row during the full join.

--
Regards,
ChangAo Chen

Attachment Content-Type Size
v4-0001-Fix-wrong-result-of-refresh-matview-concurrently.patch application/octet-stream 7.1 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Felix Hamme 2026-03-13 08:35:39 Re: BUG #19432: recovery fails at invalid checkpoint record
Previous Message Michael Paquier 2026-03-13 07:12:28 Re: BUG #18943: Return value of a function 'xmlBufferCreate' isdereferenced at xpath.c:177 without checking for NUL