pg_examiner 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97dbbbfede24a927c3f330b55b3ccf5df361d2fecd607fcd6a0567dfeb81ba00
4
- data.tar.gz: f9dab98fdf931d26a2fb75d8e89f3b2ccd528fea1017619b618d154c697bdbbf
3
+ metadata.gz: 9699762f9436eb756cd0cdb6c97c0008801f7d0866667f36c79b239dd3e8cdb6
4
+ data.tar.gz: 8d8261ca1ceb0063360ec0376b55fd0bd9489abe8b74d8cd3655330f9c34aa72
5
5
  SHA512:
6
- metadata.gz: 83409a8174c21bd6885f3cfc858fa6aba351188804ca235ac6e37f1d06316602dccddaae115f11e74f034ebd8d8e9b289c861841362904080bad10d375b11c42
7
- data.tar.gz: da864e8f1ccdfdf7f014a2f56fa3657b35182c11e4d84b2017e30a7c79c7812847a3c214f042043902f7e85a960596b45c2bcc8d9934a825d81c872eae50b581
6
+ metadata.gz: 9cba18cd2166d2b1db05e9d41d3b2038096df3a494c0d054a76a8bd9ca123285c2ffa5275fe7d1c714d3b330e6e2bc51b6fb0813ebc858e118a6c399743b601b
7
+ data.tar.gz: b3cff9b8606cf3a1fa625fefc16c73ccb0c5232d2cbac4a39f63a6dbe082eff4183999597a816a974bd7cc65091bd9cc7778d489a7879b9b5d196eb5aa0dd68a
@@ -112,12 +112,22 @@ module PGExaminer
112
112
  FROM pg_attrdef
113
113
  SQL
114
114
 
115
- @pg_proc = load_table @pg_namespace.map{|ns| ns['oid']}, <<-SQL
116
- SELECT oid, proname AS name, pronamespace, proargtypes, prorettype, proargmodes, prolang, pg_get_functiondef(oid) AS definition
117
- FROM pg_proc
118
- WHERE pronamespace IN (?)
119
- AND prokind <> 'a' -- prevent pg_get_functiondef() from throwing errors on aggregate functions.
120
- SQL
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PGExaminer
4
- VERSION = '0.5.1'
4
+ VERSION = '0.5.2'
5
5
  end
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.1
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-02-04 00:00:00.000000000 Z
11
+ date: 2019-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg