pg_query_pg_ddm 0.4 → 0.5
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 +4 -4
- data/CHANGELOG.md +28 -0
- data/ext/pg_query/extconf.rb +5 -6
- data/lib/pg_query/deparse.rb +2 -2
- data/lib/pg_query/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: 781e131d7fea65049926aa0e186c0115bbd51f686a005c086f4809a7af000222
|
4
|
+
data.tar.gz: 705765c1a62411c38c30598c49824db92bacaa127dfbeded9808c59f3073d210
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a778f80a8cfc5019b189d51b1c559eac96474c77d4bbc75d86329efed34cdfcdc6dfba0392e948ce37c2a2cb11c5e07cc1ef6fa7360e5846c62e69d249c22b04
|
7
|
+
data.tar.gz: 0f37b215dcc01d06d2052688e5a9791f19dcdce5c9bdeaad8af295d183253be7c723bc679cd2bc3f0e1a694bdf213e09fc60085786fc3655b1fe9d29e9afef0a
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,32 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.3.0 2020-12-28
|
4
|
+
|
5
|
+
* Incorporate newer libpg_query updates in 10-1.0.3 and 10-1.0.4
|
6
|
+
* Adds support for running on ARM
|
7
|
+
* Fixes asprintf warning during builds
|
8
|
+
* Updates to newer Postgres 10 patch release (10.15)
|
9
|
+
* Deparsing improvements by [@emin100](https://github.com/emin100)
|
10
|
+
* Add support for additional DROP statements (#147)
|
11
|
+
* Fix CREATE TABLE AS - Support without TEMP, Add ON COMMIT (#149)
|
12
|
+
* Empty target list support (#156)
|
13
|
+
* UNION parentheses (#158)
|
14
|
+
* OVERLAY keyword function (#161)
|
15
|
+
* Array indirection (#162)
|
16
|
+
* ARRAY functions (#163)
|
17
|
+
* Correctly handle column names that need escaping in INSERT and UPDATE statements (#164)
|
18
|
+
* INSERT INTO ON CONFLICT (#166)
|
19
|
+
* LATERAL JOIN (#168)
|
20
|
+
* UPDATE FROM clause (#170)
|
21
|
+
* SELECT aggregate FILTER (#175)
|
22
|
+
* INTERSECT operator (#176)
|
23
|
+
* Deparsing: Improve handling of boolean type casts [@himanshu-pro](https://github.com/himanshu-pro) & [@emin100](https://github.com/emin100)
|
24
|
+
* `tables` method: Find tables in the subquery of CREATE TABLE AS (#172) [@Tassosb](https://github.com/Tassosb)
|
25
|
+
* Support Ruby 3.0, verify SHA256 checksum of downloaded libpg_query (#178) [@stanhu](https://github.com/stanhu)
|
26
|
+
* Verify SHA256 checksum to guard against any malicious attempts to change the archive
|
27
|
+
* Use `URI.open` to fix Ruby 3.0 support
|
28
|
+
|
29
|
+
|
3
30
|
## 1.2.0 2019-11-10
|
4
31
|
|
5
32
|
* Reduce escaped keywords to Postgres-specific keywords, and ignore unreserved keywords
|
@@ -8,6 +35,7 @@
|
|
8
35
|
* Note that this will lead to different output than in earlier pg_query versions,
|
9
36
|
in some cases
|
10
37
|
|
38
|
+
|
11
39
|
## 1.1.1 2019-11-10
|
12
40
|
|
13
41
|
* Deparsing improvements by [@emin100](https://github.com/emin100)
|
data/ext/pg_query/extconf.rb
CHANGED
@@ -4,15 +4,14 @@ require 'digest'
|
|
4
4
|
require 'mkmf'
|
5
5
|
require 'open-uri'
|
6
6
|
|
7
|
-
LIB_PG_QUERY_TAG = '10-1.0.
|
7
|
+
LIB_PG_QUERY_TAG = '10-1.0.4'.freeze
|
8
|
+
LIB_PG_QUERY_SHA256SUM = '88cc90296e5fcaaebd0b360c46698b7c5badddf86f120e249ef682a820d41338'.freeze
|
8
9
|
|
9
10
|
workdir = Dir.pwd
|
10
11
|
libdir = File.join(workdir, 'libpg_query-' + LIB_PG_QUERY_TAG)
|
11
12
|
gemdir = File.join(__dir__, '../..')
|
12
13
|
libfile = libdir + '/libpg_query.a'
|
13
|
-
|
14
|
-
expected_sha256 = '1332761f31c198cb9825e6ccccda0b6a0e57daeb824870e8524df77f1592d149'
|
15
|
-
filename = "#{workdir}/libpg_query.tar.gz"
|
14
|
+
filename = File.join(workdir, 'libpg_query-' + LIB_PG_QUERY_TAG + '.tar.gz')
|
16
15
|
|
17
16
|
unless File.exist?(filename)
|
18
17
|
File.open(filename, 'wb') do |target_file|
|
@@ -23,8 +22,8 @@ unless File.exist?(filename)
|
|
23
22
|
|
24
23
|
checksum = Digest::SHA256.hexdigest(File.read(filename))
|
25
24
|
|
26
|
-
if checksum !=
|
27
|
-
raise "SHA256 of #{filename} does not match: got #{checksum}, expected #{
|
25
|
+
if checksum != LIB_PG_QUERY_SHA256SUM
|
26
|
+
raise "SHA256 of #{filename} does not match: got #{checksum}, expected #{LIB_PG_QUERY_SHA256SUM}"
|
28
27
|
end
|
29
28
|
end
|
30
29
|
|
data/lib/pg_query/deparse.rb
CHANGED
@@ -307,14 +307,14 @@ class PgQuery
|
|
307
307
|
'*'
|
308
308
|
end
|
309
309
|
|
310
|
-
def deparse_a_indirection(node)
|
310
|
+
def deparse_a_indirection(node) # rubocop:disable Metrics/CyclomaticComplexity
|
311
311
|
output = []
|
312
312
|
arg = deparse_item(node['arg'])
|
313
313
|
array_indirection = []
|
314
314
|
if node['indirection']
|
315
315
|
array_indirection = node['indirection'].select { |a| a.key?(A_INDICES) }
|
316
316
|
end
|
317
|
-
output << if node['arg'].key?(FUNC_CALL) || node['arg'].key?(COLUMN_REF) || node['arg'].key?(A_EXPR) || (node['arg'].key?(SUB_LINK) && array_indirection.count.zero?)
|
317
|
+
output << if node['arg'].key?(TYPE_CAST) || node['arg'].key?(FUNC_CALL) || (node['arg'].key?(COLUMN_REF) && array_indirection.count.zero?) || node['arg'].key?(A_EXPR) || (node['arg'].key?(SUB_LINK) && array_indirection.count.zero?)
|
318
318
|
"(#{arg})."
|
319
319
|
else
|
320
320
|
arg
|
data/lib/pg_query/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_query_pg_ddm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.5'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mehmet Emin KARAKAŞ
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|