Contents
PostgreSQL Views and Functions
The functions and views published in this extension are regularly needed in DBA daily jobs.
The views and functions are published in a schema of its own, pgsql_tweaks, please see the documentation Schema pgsql_tweaks.
All functions and views are covered by tests. The tests are done in simple SQL statements. Each test does raise division by zero if it fails.
The tests have been done with PostgreSQL 13 up to 18 beta 3.
Differences in the PostgreSQL behavior of previous PostgreSQL versions are noted.
Repositories
The main repository is availabe on Codeberg.
Issue Tracker
If you discover any issue, please file them on https://codeberg.org/pgsql_tweaks/pgsql_tweaks/issues.
Installation
You may either, install all functions as a package, or install single functions of your choice.
Please see the Installation Dokumentation documentation.
Building the Extension
Please see the Developer Information documentation.
Contribution Informaion
Please read the Contribution Informaion before you open a merge request.
Documentation
Detailed documentation is available on rtfm.pgsql-tweaks.org, this documentation just links the documentation there.
Additional Extensions
Parts of this extension do need additional extensions. It is documented in views and functions, when they depend on an additional extension.
All additional extensions are part of the PostgreSQL Additional Supplied Modules and Extensions
List of Additional Extensions
Functions and Views
- Schema pgsql_tweaks
- Function Documentation
- Functions to check data types
- FUNCTION is_date
- FUNCTION is_time
- FUNCTION is_timestamp
- FUNCTION is_real
- FUNCTION is_double_precision
- FUNCTION is_numeric
- FUNCTION is_bigint
- FUNCTION is_integer
- FUNCTION is_smallint
- FUNCTION is_boolean
- FUNCTION is_json
- FUNCTION is_jsonb
- FUNCTION is_hex
- Functions about Encryption
- System Information Functions
- FUNCTION pg_schema_size
- FUNCTION role_inheritance
- Encoding Functions
- FUNCTION is_encoding
- FUNCTION is_latin1
- FUNCTION return_not_part_of_latin1
- FUNCTION replace_latin1
- FUNCTION return_not_part_of_encoding
- FUNCTION replace_encoding
- Aggregate Functions
- AGGREGATE gap_fill
- AGGREGATE array_min
- AGGREGATE array_max
- AGGREGATE array_avg
- AGGREGATE array_sum
- Format Functionshttps://rtfm.pgsql-tweaks.org/docs/functions/format/index.html
- FUNCTION date_de
- FUNCTION datetime_de
- Conversion Functions
- FUNCTION to_unix_timestamp
- FUNCTION hex2bigint
- Other functions
- FUNCTION is_empty
- FUNCTION array_trim
- FUNCTION get_markdown_doku_by_schema
- View Documentation
- System Information Views Documentation
- VIEW pg_db_views
- VIEW pg_foreign_keys
- VIEW pg_functions
- VIEW pg_active_locks
- VIEW pg_table_matview_infos
- VIEW pg_object_ownership
- VIEW pg_partitioned_tables_infos
- VIEW pg_unused_indexes
- VIEW pg_bloat_info
- VIEW pg_table_bloat
- VIEW pg_missing_indexes
- VIEW pg_role_permissions
- VIEW pg_role_infos
- Statistic and Monitoring Views
- VIEW statistics_top_ten_query_times
- VIEW top_ten_query_average_time_in_seconds
- VIEW statistics_top_ten_time_consuming_queries
- VIEW statistics_top_ten_memory_usage_queries
- VIEW statistics_top_ten_called_queries
- VIEW statistics_top_ten_rows_returned_queries
- VIEW statistics_top_ten_shared_block_hits_queries
- VIEW statistics_top_ten_wal_records_generated_queries
- VIEW statistics_query_activity
- Monitoring Views Documentation
- VIEW monitoring_wal
- VIEW wal_archiving
- VIEW monitoring_active_locks
- VIEW monitoring_replication
- VIEW monitoring_database_conflicts
- VIEW monitoring_blocked_and_blocking_activity
- VIEW monitoring_follower_wal_status
- VIEW monitoring_vacuum