From: | Tender Wang <tndrwang(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Alexander Lakhin <exclusion(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #18310: Some SQL commands fail to process duplicate objects with error: tuple already updated by self |
Date: | 2024-01-26 06:21:12 |
Message-ID: | CAHewXNk5yeUo2XPaqTYSfbkKhEBfKd4VYa7NHv2MzV-mJ9ULpA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Tender Wang <tndrwang(at)gmail(dot)com> 于2024年1月26日周五 12:54写道:
>
>
> Michael Paquier <michael(at)paquier(dot)xyz> 于2024年1月26日周五 11:41写道:
>
>> On Fri, Jan 26, 2024 at 11:33:24AM +0800, Tender Wang wrote:
>> > How about using list *res replace int *res in getTokenTypes(), so we can
>> > use list_append_unique().
>> > In outer function, use list *tokens to replace int *tokens, and ntokens
>> =
>> > list_length(tokens) not list_length(stmt->tokentype).
>>
>> Yeah, I was wondering about this code path. If you feel strongly
>> about that, would you like to write a patch?
>>
>
> Ok, I try to fix it.
>
As I said before, return List looks like not complicated to solve this
issue.
I found another problem, it didn't report NOTICE if SQL has IF EXISTS, for
example:
postgres=# alter text search configuration ispell_tst drop mapping if
exists for test;
ERROR: token type "test" does not exist
So I change the func getTokenTypes() interface and remove
DropConfigurationMapping() error report into getTokenTypes().
--
>> Michael
>>
>
>
> --
> Tender Wang
> OpenPie: https://en.openpie.com/
>
--
Tender Wang
OpenPie: https://en.openpie.com/
Attachment | Content-Type | Size |
---|---|---|
0001-Fix-reporting-error-when-process-duplicate-token-typ.patch | application/octet-stream | 7.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Lakhin | 2024-01-26 07:00:00 | Re: [BUG] false positive in bt_index_check in case of short 4B varlena datum |
Previous Message | Tender Wang | 2024-01-26 04:54:07 | Re: BUG #18310: Some SQL commands fail to process duplicate objects with error: tuple already updated by self |