[PATCH] psql: Complete GRANTED BY in GRANT and REVOKE

Поиск
Список
Период
Сортировка
Искать

[PATCH] psql: Complete GRANTED BY in GRANT and REVOKE

От:
Neil Chen <carpenter.nail.cz@gmail.com>
Дата:
Вложения:
Hi hackers,

While trying REVOKE ... GRANTED BY in PostgreSQL 19, I noticed that
psql doesn't complete the clause or the grantor's name.

I tried the corresponding GRANT and found that pressing Tab after
a trailing space on this line inserts TO, making the statement invalid.

GRANT SELECT ON t TO r WITH GRANT OPTION

Before the patch, the generic GRANT rule treats the trailing GRANT
OPTION as GRANT followed by a role name. The patch matches WITH
GRANT OPTION first, so Tab inserts GRANTED BY. It also completes
the clause and grantor name in both commands.

Thanks,

--
Ze Chen (Neil)
HighGo Software Co., Ltd.
https://www.highgo.com/
FAQ