| From: | Viktor Holmberg <v(at)viktorh(dot)net> |
|---|---|
| To: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com> |
| Cc: | pgsql-hackers(at)postgresql(dot)org, Marko Tiikkaja <marko(at)joh(dot)to>, Andreas Karlsson <andreas(at)proxel(dot)se> |
| Subject: | Re: ON CONFLICT DO SELECT (take 3) |
| Date: | 2025-11-24 15:23:17 |
| Message-ID: | 9284d41a-57a6-4a37-ac9f-873cb5c509d4@Spark |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 24 Nov 2025 at 11:39 +0100, Viktor Holmberg <v(at)viktorh(dot)net>, wrote:
> Got a complication warning in CI: error: ‘lockmode’ may be used uninitialized. Hopefully this fixes it.
It did not. But this will.
For some reason, in this bit:
‘''
LockTupleMode lockmode;
….
case LCS_FORUPDATE:
lockmode = LockTupleExclusive;
break;
case LCS_NONE:
elog(ERROR, "unexpected lock strength %d", lockStrength);
}
if (!ExecOnConflictLockRow(context, existing, conflictTid,
resultRelInfo->ri_RelationDesc, lockmode, false))
return false;
‘''
GCC gives warning "error: ‘lockmode’ may be used uninitialized”. But if I switch the final exhaustive “case" to a “default” the warning goes away. Strange, if anyone know how to fix let me know. But also I don’t think it’s a big deal.
| Attachment | Content-Type | Size |
|---|---|---|
| v15-0001-Add-support-for-INSERT-.-ON-CONFLICT-DO-SELECT.patch | application/octet-stream | 125.6 KB |
| v15-0002-More-suggested-review-comments.patch | application/octet-stream | 32.3 KB |
| v15-0003-extra-tests-for-ONCONFLICT_SELECT-ExecInitPartit.patch | application/octet-stream | 9.0 KB |
| v15-0004-ON-CONFLCIT-DO-SELECT-More-review-fixes.patch | application/octet-stream | 24.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2025-11-24 15:47:49 | Re: make -C src/test/isolation failure in index-killtuples due to btree_gist |
| Previous Message | Sami Imseih | 2025-11-24 15:19:12 | Re: another autovacuum scheduling thread |