Hi Álvaro, Sorry for the late reply. Thank you for the review.
> Hmm, so the commit message says > > Leave completion directly after a column list unchanged. Adding USING > INDEX there requires accounting for the ANALYZE option and is deferred > to a separate change. > > but that's not correct, isn't it? It's offering a column list itself > that's problematic (i.e., it requires the analyze option to be present), > not the USING INDEX clause. I don't see why we wouldn't offer to add > USING INDEX. > You're right; the commit message conflated the column-list requirement with the subsequent `USING INDEX` clause. V5 corrects that explanation, completes `USING INDEX` after a column list, and offers `(` after a table name when an option list is present, without checking `ANALYZE`. > Is really REPACK the first command where the syntax causes this kind of > problem? Hmm, I'm now wondering if we should make this error a WARNING > instead: > There is a similar restriction in `VACUUM`: `ExecVacuum()` rejects a column list without `ANALYZE`, using the same error message [1]. I'd keep any change from an error to a warning separate from this completion fix and consider the behaviour of both commands together. [1] https://github.com/postgres/postgres/blob/c074737f687f604b64f6ee830fccbbe854719823/src/backend/commands/vacuum.c#L341-L354 Thanks, Sho -- ======================================= *Sho Ito (Sean)* E-mail: [email protected] LinkedIn: *https://www.linkedin.com/in/sho-ito-0628/ <https://www.linkedin.com/in/sho-ito-0628/>* GitHub: https://github.com/sean0628/ =======================================
v5-0002-psql-Add-regression-tests-for-REPACK-tab-completi.patch
Description: Binary data
v5-0001-psql-Fix-REPACK-tab-completion-around-USING-INDEX.patch
Description: Binary data
