Open tjdavis3 opened 3 years ago
It seems this PR covers mysql, mssql and postgreSQL. Is there any other supported dbs with such functionality?
I see that
The stored procedures and functions do appear now, but the presentation only works for very simple procedures. Here's what one of my current databases looks like.
Name | ReturnType | Arguments | Type |
---|---|---|---|
public.pg_stat_statements | record | showtext boolean, OUT userid oid, OUT dbid oid, OUT queryid bigint, OUT query text, OUT calls bigint, OUT total_time double precision, OUT min_time double precision, OUT max_time double precision, OUT mean_time double precision, OUT stddev_time double precision, OUT rows bigint, OUT shared_blks_hit bigint, OUT shared_blks_read bigint, OUT shared_blks_dirtied bigint, OUT shared_blks_written bigint, OUT local_blks_hit bigint, OUT local_blks_read bigint, OUT local_blks_dirtied bigint, OUT local_blks_written bigint, OUT temp_blks_read bigint, OUT temp_blks_written bigint, OUT blk_read_time double precision, OUT blk_write_time double precision | FUNCTION |
public.pg_stat_statements_reset | void | FUNCTION | |
public.pg_buffercache_pages | record | FUNCTION | |
public.base36_encode | varchar | digits bigint, min_width integer DEFAULT 0 | FUNCTION |
public.friendly_id | varchar | digits bigint, prefix character varying DEFAULT 'M5'::character varying | FUNCTION |
Some enhancements that would be nice:
pg_*
.FUNCTION public.friendly_id(bigint, character) returns varchar
Description (from the comment in the db)
Parameters:
- digits (bigint)
prefix (character varying DEFAULT 'M5'::character varying)
-> Create Statement
I really wish the functions table would show the comment of the function like for tables, columns, etc. Right now the comments are not shown anywhere which makes the table not that useful for documentation.
COMMENT ON FUNCTION foo_bar IS '...';
Add UDF and stored procedure documentation to the database. Some databases (eg. mysql) all a comment to
create procedure
that can be used. Others may need to look for comments in the DDL. At a minimum just creating a list of them (and/or a separate page that could be edited) would be helpful.