From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org> |
Cc: | vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Miscellaneous tab completion issue fixes |
Date: | 2022-10-04 03:43:45 |
Message-ID: | Yzur8a4jJJoainiK@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Oct 03, 2022 at 06:29:32PM +0100, Dagfinn Ilmari Mannsåker wrote:
> vignesh C <vignesh21(at)gmail(dot)com> writes:
>> + else if (TailMatchesCS("\\dRp*"))
>> + COMPLETE_WITH_QUERY(Query_for_list_of_publications[0].query);
>> + else if (TailMatchesCS("\\dRs*"))
>> + COMPLETE_WITH_QUERY(Query_for_list_of_subscriptions[0].query);
>
> These are version-specific queries, so should be passed in their
> entirety to COMPLETE_WITH_VERSIONED_QUERY() so that psql can pick the
> right version, and avoid sending the query at all if the server is too
> old.
+1.
>> +/* add these to Query_for_list_of_roles in OWNER TO contexts */
>> +#define Keywords_for_list_of_owner_to_roles \
>> +"CURRENT_ROLE", "CURRENT_USER", "SESSION_USER"
>
> I think this would read better without the TO, both in the comment and
> the constant name, similar to the below only having GRANT without TO:
Keywords_for_list_of_grant_roles is used in six code paths, so it
seems to me that there is little gain in having a separate #define
here. Let's just specify the list of allowed roles (RoleSpec) where
OWNER TO is parsed.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2022-10-04 03:45:30 | Re: ExecRTCheckPerms() and many prunable partitions |
Previous Message | Andres Freund | 2022-10-04 03:25:40 | Re: [RFC] building postgres with meson - v13 |