ruby-pg-extras 4.8.1 → 4.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -0
- data/lib/ruby-pg-extras.rb +1 -1
- data/lib/ruby_pg_extras/queries/connections.sql +4 -0
- data/lib/ruby_pg_extras/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4b41078ac90e9598de6184dd02b7d351cafd32456e4f398f2d7902e233f053d
|
4
|
+
data.tar.gz: a8f19f5324b1c94a8f2516cf44087afec4d58b9a93537602175d225aeccb51e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48bbea030d77d6b27ff9000d3b7b7cf66a75386321559db2ba925edcc4c6dac9893ff5ce2bea54676b250a0e0e5219a9faf874b02e10d96236a249c84c2d9352
|
7
|
+
data.tar.gz: efb3cff55c6f5421813f3ac6d88cdbbd96ed08d1b8246099bf17416691ed480ae96459b2e2ce9c3dbc95eed418a85e4011097235f9407d0a9e359ec154260537
|
data/README.md
CHANGED
@@ -635,6 +635,24 @@ RubyPgExtras.mandelbrot
|
|
635
635
|
|
636
636
|
This command outputs the Mandelbrot set, calculated through SQL.
|
637
637
|
|
638
|
+
### `connections`
|
639
|
+
|
640
|
+
```ruby
|
641
|
+
|
642
|
+
RubyPgExtras.connections
|
643
|
+
|
644
|
+
+-----------------------------------------------------+
|
645
|
+
| Returns the list of all active database connections |
|
646
|
+
+-----------------+----------------+------------------+
|
647
|
+
| username | client_address | application_name |
|
648
|
+
+-----------------+----------------+------------------+
|
649
|
+
| postgres | 172.19.0.1/32 | psql |
|
650
|
+
| postgres | 172.19.0.1/32 | irb |
|
651
|
+
+-----------------+----------------+------------------+
|
652
|
+
```
|
653
|
+
|
654
|
+
This command returns the list of all active database connections.
|
655
|
+
|
638
656
|
## Testing
|
639
657
|
|
640
658
|
```bash
|
data/lib/ruby-pg-extras.rb
CHANGED
@@ -24,7 +24,7 @@ module RubyPgExtras
|
|
24
24
|
table_size total_index_size total_table_size
|
25
25
|
unused_indexes duplicate_indexes vacuum_stats kill_all
|
26
26
|
pg_stat_statements_reset buffercache_stats
|
27
|
-
buffercache_usage ssl_used
|
27
|
+
buffercache_usage ssl_used connections
|
28
28
|
)
|
29
29
|
|
30
30
|
DEFAULT_ARGS = Hash.new({}).merge({
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-pg-extras
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pawurb
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -96,6 +96,7 @@ files:
|
|
96
96
|
- lib/ruby_pg_extras/queries/cache_hit.sql
|
97
97
|
- lib/ruby_pg_extras/queries/calls.sql
|
98
98
|
- lib/ruby_pg_extras/queries/calls_legacy.sql
|
99
|
+
- lib/ruby_pg_extras/queries/connections.sql
|
99
100
|
- lib/ruby_pg_extras/queries/db_settings.sql
|
100
101
|
- lib/ruby_pg_extras/queries/duplicate_indexes.sql
|
101
102
|
- lib/ruby_pg_extras/queries/extensions.sql
|