| From: | Peter Geoghegan <pg(at)bowt(dot)ie> |
|---|---|
| To: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
| Cc: | Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: weird ON CONFLICT clauses |
| Date: | 2025-11-27 16:40:18 |
| Message-ID: | CAH2-Wzn38BS7b0yqMy9AxZHjbcH4bBaFtwVRTpLaHW93oHiGLA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Nov 27, 2025 at 11:00 AM Álvaro Herrera <alvherre(at)kurilemu(dot)de> wrote:
> Why do we accept reloptions there without complaint? Should we tighten
> this up a little bit, or maybe it makes sense to accept this for some
> reason? I suspect the reloptions were added to index_elems after the ON
> CONFLICT clause was made to use that production, but I didn't check the
> git history.
index_elems is needed by ON CONFLICT so that the user can specify an
operator class and/or a collation. This is probably hardly ever used,
but it does have its place.
> So what about the attached patch? I ran all tests and everything seems
> to work correctly. (Maybe I'd add some tests to verify that this
> new error is covered, as the ones just above.) It would complain to the
> above:
Seems reasonable to me.
--
Peter Geoghegan
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2025-11-27 16:55:21 | Re: Second RewriteQuery complains about first RewriteQuery in edge case |
| Previous Message | Maxim Orlov | 2025-11-27 16:00:30 | Using MyDatabaseId in SET_LOCKTAG_APPLY_TRANSACTION |