RE: (LOCK TABLE options) “ONLY” and “NOWAIT” are not yet implemented
shinya11.kato@nttdata.com
From: <Shinya11.Kato@nttdata.com>
To: <bt21tanigaway@oss.nttdata.com>
Cc: <masao.fujii@oss.nttdata.com>, <pgsql-hackers@lists.postgresql.org>
Date: 2021-09-30T03:18:29Z
Lists: pgsql-hackers
Attachments
- fix_tab_completion_of_lock.patch (application/octet-stream) patch
>Thank you for your feedback.
>I might have added whitespace when I was checking the patch file.
>I attach a new patch to this mail.
Thank you for the update!
> else if (Matches("LOCK", MatchAny, "IN", "ACCESS|ROW") ||
>- Matches("LOCK", "TABLE", MatchAny, "IN", "ACCESS|ROW"))
>+ Matches("LOCK", "TABLE", MatchAny, "IN", "ACCESS|ROW") ||
>+ Matches("LOCK", "ONLY", MatchAny, "IN", "ACCESS|ROW") ||
>+ Matches("LOCK", "TABLE", "ONLY", MatchAny, "IN", "ACCESS|ROW"))
I think this code is redundant, so I change following.
---
else if (HeadMatches("LOCK") && TailMatches("IN", "ACCESS|ROW"))
---
I created the patch, and attached it. Do you think?
>> 2. The command "LOCK TABLE a, b;" can be executed, but tab-completion
>> doesn't work properly. Is it OK?
>It's OK for now.
>But it should be able to handle a case of multiple tables in the future.
OK. I agreed.
Regards,
Shinya Kato
Commits
-
psql: Improve tab-completion for LOCK TABLE.
- 0b0d277c3553 15.0 landed