| From: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
|---|---|
| To: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: COMMENT/SEC LABEL tab complete support suggests wrong SQL. |
| Date: | 2026-09-18 08:27:50 |
| Message-ID: | 8AF39AC6-0FFF-4365-A390-CDA993E84797@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On Sep 18, 2026, at 16:01, Kirill Reshke <reshkekirill(at)gmail(dot)com> wrote:
>
> HI!
>
> I noticed an issue on tab completion with LARGE OBJECT support. I am
> aware that tab complete support need not to be always-correct, but
> this cases are simple, so decided to fix.
>
> The psql tab completion for COMMENT ON and SECURITY LABEL ON suggests
> "IS" immediately after "LARGE OBJECT", this produces invalid SQL:
>
> =# COMMENT ON LARGE OBJECT <TAB>
> -- now COMMENT ON LARGE OBJECT IS
>
> The same bug exists for SECURITY LABEL. SEC LABEL also missed EVENT
> TRIGGER/ FOREIGN TABLE/MATERIALIZED VIEW cases.
>
> Same bug was fixed for GRANT/REVOKE in ff0bcb248e6.
>
>
>
> Quick sum up:
> Before:
> COMMENT ON LARGE OBJECT <TAB> → IS (invalid SQL)
> SECURITY LABEL ON LARGE OBJECT <TAB> → IS (invalid SQL)
> SECURITY LABEL ON EVENT TRIGGER <TAB> → IS (invalid SQL)
> SECURITY LABEL ON FOREIGN TABLE <TAB> → IS (invalid SQL)
> SECURITY LABEL ON MATERIALIZED VIEW <TAB> → IS (invalid SQL)
>
> After:
> COMMENT ON LARGE OBJECT <TAB> → OID list (correct)
> SECURITY LABEL ON LARGE OBJECT <TAB> → OID list (correct)
> SECURITY LABEL ON EVENT TRIGGER <TAB> → trigger name list (correct)
> SECURITY LABEL ON FOREIGN TABLE <TAB> → foreign table list (correct)
> SECURITY LABEL ON MATERIALIZED VIEW <TAB> → matview list (correct)
>
>
>
> --
> Best regards,
> Kirill Reshke
> <v1-0001-psql-Fix-tab-completion-for-COMMENT-SECURITY-LABE.patch>
Do we also need to support SECURITY LABEL FOR provider ON LARGE OBJECT …?
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | kedar anavardekar | 2026-09-18 08:30:49 | Re: [PATCH] Release replication slot on error in SQL-callable slot functions |
| Previous Message | Nisha Moond | 2026-09-18 08:05:04 | Re: Proposal: Conflict log history table for Logical Replication |