Re: BUG #18310: Some SQL commands fail to process duplicate objects with error: tuple already updated by self
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Tender Wang <tndrwang@gmail.com>
Cc: Alexander Lakhin <exclusion@gmail.com>, pgsql-bugs@lists.postgresql.org
Date: 2024-01-31T04:25:11Z
Lists: pgsql-bugs
On Tue, Jan 30, 2024 at 07:51:45PM +0800, Tender Wang wrote: > I refactor previes patch based on your suggestion, please review the new > attached patch. Thanks for the new patch. I've found the logic to be basically OK, minus edits with the structure, the routine names and some comments. Unfortunately, the set of regression tests was too shy because this only tested for the case of duplicated tokens when overridding mappings, while missing: - ADD MAPPING that failed on a constraint failure. - DROP MAPPING that failed with an deletion failure. - The case of IF EXISTS with tokens supported or not supported by a configuration's parser. That was not related to the report of this patch, but as we've discussed it is very easy to miss the historical distinction between the way this clause is handled. In short, there was zero coverage for these code paths. See DropConfigurationMapping() that was completely red, for one: https://coverage.postgresql.org/src/backend/commands/tsearchcmds.c.gcov.html This should be marked as covered pretty soon. I was also hesitating about the addition of a test with REPLACE, actually.. -- Michael
Commits
-
Fix various issues with ALTER TEXT SEARCH CONFIGURATION
- 0561097822a1 12.18 landed
- 4d0e8a008bdc 13.14 landed
- dde5b01c33f9 14.11 landed
- 41fa4b31c12f 15.6 landed
- f33e83285a14 16.2 landed
- 3e91dba8b079 17.0 landed
-
Fix DROP ROLE when specifying duplicated roles
- f57a580fd280 16.2 landed
- 50b797dc99ec 17.0 landed