COMPLETE_WITH_CONST("FROM");
}
- /* Complete "GRANT/REVOKE * ON * *" with TO/FROM */
- else if (pg_strcasecmp(prev5_wd, "GRANT") == 0 &&
- pg_strcasecmp(prev3_wd, "ON") == 0)
- COMPLETE_WITH_CONST("TO");
-
- else if (pg_strcasecmp(prev5_wd, "REVOKE") == 0 &&
- pg_strcasecmp(prev3_wd, "ON") == 0)
- COMPLETE_WITH_CONST("FROM");
-
/* Complete "GRANT/REVOKE * ON ALL * IN SCHEMA *" with TO/FROM */
else if ((pg_strcasecmp(prev8_wd, "GRANT") == 0 ||
pg_strcasecmp(prev8_wd, "REVOKE") == 0) &&
pg_strcasecmp(prev_wd, "FROM") == 0))
COMPLETE_WITH_QUERY(Query_for_list_of_grant_roles);
+ /* Complete "GRANT/REVOKE * ON * *" with TO/FROM */
+ else if (pg_strcasecmp(prev5_wd, "GRANT") == 0 &&
+ pg_strcasecmp(prev3_wd, "ON") == 0)
+ COMPLETE_WITH_CONST("TO");
+
+ else if (pg_strcasecmp(prev5_wd, "REVOKE") == 0 &&
+ pg_strcasecmp(prev3_wd, "ON") == 0)
+ COMPLETE_WITH_CONST("FROM");
+
/*
* Complete "GRANT/REVOKE * TO/FROM" with username, PUBLIC,
* CURRENT_USER, or SESSION_USER.