-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: make pg_description aware of builtin function descriptions
This also extends the completion rules to properly handle functions in multiple namespaces. Release note (bug fix): `pg_catalog.pg_description` and `pg_catalog.obj_description()` are now able to retrieve the descriptive help for built-in functions.
- Loading branch information
Showing
10 changed files
with
295 additions
and
496 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
sql | ||
CREATE FUNCTION lalala(val INT) RETURNS INT LANGUAGE SQL AS $$ SELECT val $$; | ||
CREATE FUNCTION lastval(val INT) RETURNS INT LANGUAGE SQL AS $$ SELECT val $$; | ||
---- | ||
ok | ||
|
||
complete | ||
SELECT la@ | ||
---- | ||
complete 0 9 | ||
msg: "" | ||
completions: | ||
- "functions": | ||
"lag(" ((from schema pg_catalog) Returns `val` evaluated at the previous row within current row's partition; if t) -> "lag(" (0, 2) | ||
"lalala(" ((from schema public) ) -> "lalala(" (0, 2) | ||
"last_value(" ((from schema pg_catalog) Returns `val` evaluated at the row that is the last row of the window frame) -> "last_value(" (0, 2) | ||
"lastval(" ((from schema pg_catalog) Return value most recently obtained with nextval in this session) -> "lastval(" (0, 2) | ||
"lastval(" ((from schema public) ) -> "lastval(" (0, 2) | ||
- "keyword": | ||
"LABEL" (unreserved) -> "LABEL" (0, 2) | ||
"LANGUAGE" (unreserved) -> "LANGUAGE" (0, 2) | ||
"LAST" (unreserved) -> "LAST" (0, 2) | ||
"LATERAL" (reserved) -> "LATERAL" (0, 2) | ||
"LATEST" (unreserved) -> "LATEST" (0, 2) | ||
|
||
complete | ||
SELECT pg_catalog.la@ | ||
---- | ||
complete 0 20 | ||
msg: "" | ||
completions: | ||
- "functions": | ||
"pg_catalog.lag(" (Returns `val` evaluated at the previous row within current row's partition; if t) -> "pg_catalog.lag(" (0, 13) | ||
"pg_catalog.last_value(" (Returns `val` evaluated at the row that is the last row of the window frame) -> "pg_catalog.last_value(" (0, 13) | ||
"pg_catalog.lastval(" (Return value most recently obtained with nextval in this session) -> "pg_catalog.lastval(" (0, 13) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.