pgsql_tweaks
pgsql_tweaks
pgsql_tweaks : Some functions and views for daily usage
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 4200 | pgsql_tweaks
|
pgsql_tweaks
|
1.0.2 |
UTIL
|
PostgreSQL
|
SQL
|
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
--s-d-r
|
No
|
Yes
|
No
|
Yes
|
yes
|
no
|
| Relationships | |
|---|---|
| See Also | pg_extra_time
extra_window_functions
gzip
bzip
zstd
http
pg_net
pg_curl
|
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | MIXED
|
1.0.2 |
18
17
16
15
14
|
pgsql_tweaks |
- |
| RPM | PGDG
|
1.0.2 |
18
17
16
15
14
|
pgsql_tweaks_$v |
- |
| DEB | PIGSTY
|
1.0.2 |
18
17
16
15
14
|
postgresql-$v-pgsql-tweaks |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
el8.x86_64
|
PGDG 1.0.2
|
PGDG 1.0.2
|
PGDG 1.0.2
|
PGDG 1.0.2
|
PGDG 1.0.2
|
el8.aarch64
|
PGDG 1.0.2
|
PGDG 1.0.2
|
PGDG 1.0.2
|
PGDG 1.0.2
|
PGDG 1.0.2
|
el9.x86_64
|
PGDG 1.0.2
|
PGDG 1.0.2
|
PGDG 1.0.2
|
PGDG 1.0.2
|
PGDG 1.0.2
|
el9.aarch64
|
PGDG 1.0.2
|
PGDG 1.0.2
|
PGDG 1.0.2
|
PGDG 1.0.2
|
PGDG 1.0.2
|
el10.x86_64
|
PGDG 1.0.2
|
PGDG 1.0.2
|
PGDG 1.0.2
|
PGDG 1.0.2
|
PGDG 1.0.2
|
el10.aarch64
|
PGDG 1.0.2
|
PGDG 1.0.2
|
PGDG 1.0.2
|
PGDG 1.0.2
|
PGDG 1.0.2
|
d12.x86_64
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
d12.aarch64
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
d13.x86_64
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
d13.aarch64
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
u22.x86_64
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
u22.aarch64
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
u24.x86_64
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
u24.aarch64
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
PIGSTY 1.0.2
|
Source
pig build pkg pgsql_tweaks; # build debInstall
Make sure PGDG and PIGSTY repo available:
pig repo add pgsql -u # add both repo and update cacheInstall this extension with pig:
pig install pgsql_tweaks; # install via package name, for the active PG version
pig install pgsql_tweaks -v 18; # install for PG 18
pig install pgsql_tweaks -v 17; # install for PG 17
pig install pgsql_tweaks -v 16; # install for PG 16
pig install pgsql_tweaks -v 15; # install for PG 15
pig install pgsql_tweaks -v 14; # install for PG 14Create this extension with:
CREATE EXTENSION pgsql_tweaks;Usage
pgsql_tweaks: PostgreSQL views and functions for DBA daily jobs
All objects are created in the pgsql_tweaks schema. Full documentation: rtfm.pgsql-tweaks.org
Data Type Check Functions
SELECT pgsql_tweaks.is_date('2024-01-15'); -- true
SELECT pgsql_tweaks.is_integer('42'); -- true
SELECT pgsql_tweaks.is_numeric('3.14'); -- true
SELECT pgsql_tweaks.is_json('{"a":1}'); -- true
SELECT pgsql_tweaks.is_jsonb('{"a":1}'); -- true
SELECT pgsql_tweaks.is_boolean('true'); -- true
SELECT pgsql_tweaks.is_timestamp('2024-01-15 10:30:00'); -- true
SELECT pgsql_tweaks.is_hex('FF'); -- trueSystem Information Functions
SELECT pgsql_tweaks.pg_schema_size('public'); -- schema size in bytesAggregate Functions
gap_fill– fill gaps in time seriesarray_min,array_max,array_avg,array_sum– array aggregates
Conversion Functions
SELECT pgsql_tweaks.to_unix_timestamp(now());
SELECT pgsql_tweaks.hex2bigint('FF');Utility Functions
SELECT pgsql_tweaks.is_empty(''); -- true
SELECT pgsql_tweaks.array_trim(ARRAY['a','','b']);System Information Views
pg_db_views,pg_foreign_keys,pg_functions,pg_active_lockspg_table_matview_infos,pg_object_ownership,pg_unused_indexespg_bloat_info,pg_missing_indexes,pg_role_permissions
Monitoring Views
monitoring_wal,monitoring_active_locks,monitoring_replicationmonitoring_database_conflicts,monitoring_vacuumstatistics_top_ten_query_times,statistics_query_activity
Last updated on