pg_examiner 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pg_examiner/result.rb +16 -6
- data/lib/pg_examiner/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9699762f9436eb756cd0cdb6c97c0008801f7d0866667f36c79b239dd3e8cdb6
|
4
|
+
data.tar.gz: 8d8261ca1ceb0063360ec0376b55fd0bd9489abe8b74d8cd3655330f9c34aa72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cba18cd2166d2b1db05e9d41d3b2038096df3a494c0d054a76a8bd9ca123285c2ffa5275fe7d1c714d3b330e6e2bc51b6fb0813ebc858e118a6c399743b601b
|
7
|
+
data.tar.gz: b3cff9b8606cf3a1fa625fefc16c73ccb0c5232d2cbac4a39f63a6dbe082eff4183999597a816a974bd7cc65091bd9cc7778d489a7879b9b5d196eb5aa0dd68a
|
data/lib/pg_examiner/result.rb
CHANGED
@@ -112,12 +112,22 @@ module PGExaminer
|
|
112
112
|
FROM pg_attrdef
|
113
113
|
SQL
|
114
114
|
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
115
|
+
# Handle change to system table in PG 11.
|
116
|
+
if @conn.server_version >= 110000
|
117
|
+
@pg_proc = load_table @pg_namespace.map{|ns| ns['oid']}, <<-SQL
|
118
|
+
SELECT oid, proname AS name, pronamespace, proargtypes, prorettype, proargmodes, prolang, pg_get_functiondef(oid) AS definition
|
119
|
+
FROM pg_proc
|
120
|
+
WHERE pronamespace IN (?)
|
121
|
+
AND prokind <> 'a' -- prevent pg_get_functiondef() from throwing errors on aggregate functions.
|
122
|
+
SQL
|
123
|
+
else
|
124
|
+
@pg_proc = load_table @pg_namespace.map{|ns| ns['oid']}, <<-SQL
|
125
|
+
SELECT oid, proname AS name, pronamespace, proargtypes, prorettype, proargmodes, prolang, pg_get_functiondef(oid) AS definition
|
126
|
+
FROM pg_proc
|
127
|
+
WHERE pronamespace IN (?)
|
128
|
+
AND NOT proisagg -- prevent pg_get_functiondef() from throwing errors on aggregate functions.
|
129
|
+
SQL
|
130
|
+
end
|
121
131
|
|
122
132
|
@pg_extension = execute <<-SQL
|
123
133
|
SELECT extname AS name, extnamespace, extversion
|
data/lib/pg_examiner/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_examiner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Hanks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|