1
- # pg_query_go [ ![ GoDoc] ( https://godoc.org/github.com/pganalyze/pg_query_go/v5 ?status.svg )] ( https://godoc.org/github.com/pganalyze/pg_query_go/v5 )
1
+ # pg_query_go [ ![ GoDoc] ( https://godoc.org/github.com/pganalyze/pg_query_go/v6 ?status.svg )] ( https://godoc.org/github.com/pganalyze/pg_query_go/v6 )
2
2
3
3
Go version of https://github.com/pganalyze/pg_query
4
4
@@ -10,7 +10,7 @@ You can find further background to why a query's parse tree is useful here: http
10
10
## Installation
11
11
12
12
```
13
- go get github.com/pganalyze/pg_query_go/v5 @latest
13
+ go get github.com/pganalyze/pg_query_go/v6 @latest
14
14
```
15
15
16
16
Due to compiling parts of PostgreSQL, the first time you build against this library it will take a bit longer.
@@ -44,7 +44,7 @@ package main
44
44
import (
45
45
" fmt"
46
46
47
- pg_query " github.com/pganalyze/pg_query_go/v5 "
47
+ pg_query " github.com/pganalyze/pg_query_go/v6 "
48
48
)
49
49
50
50
func main () {
@@ -72,7 +72,7 @@ package main
72
72
import (
73
73
" fmt"
74
74
75
- pg_query " github.com/pganalyze/pg_query_go/v5 "
75
+ pg_query " github.com/pganalyze/pg_query_go/v6 "
76
76
)
77
77
78
78
func main () {
@@ -98,7 +98,7 @@ package main
98
98
import (
99
99
" fmt"
100
100
101
- pg_query " github.com/pganalyze/pg_query_go/v5 "
101
+ pg_query " github.com/pganalyze/pg_query_go/v6 "
102
102
)
103
103
104
104
func main () {
@@ -135,7 +135,7 @@ package main
135
135
import (
136
136
" fmt"
137
137
138
- pg_query " github.com/pganalyze/pg_query_go/v5 "
138
+ pg_query " github.com/pganalyze/pg_query_go/v6 "
139
139
)
140
140
141
141
func main () {
@@ -173,27 +173,28 @@ go build -a
173
173
go test -test.bench=. -test.run=XXX -test.benchtime 10s -test.benchmem -test.cpu=4
174
174
goos: darwin
175
175
goarch: arm64
176
- pkg: github.com/pganalyze/pg_query_go/v5
177
- BenchmarkParseSelect1-4 2945772 4234 ns/op 1104 B/op 20 allocs/op
178
- BenchmarkParseSelect2-4 798510 14618 ns/op 2896 B/op 59 allocs/op
179
- BenchmarkParseCreateTable-4 340454 33893 ns/op 8544 B/op 151 allocs/op
180
- BenchmarkParseSelect1Parallel-4 9166213 1332 ns/op 1104 B/op 20 allocs/op
181
- BenchmarkParseSelect2Parallel-4 2795493 4329 ns/op 2896 B/op 59 allocs/op
182
- BenchmarkParseCreateTableParallel-4 1000000 10325 ns/op 8544 B/op 151 allocs/op
183
- BenchmarkRawParseSelect1-4 3775879 3186 ns/op 192 B/op 5 allocs/op
184
- BenchmarkRawParseSelect2-4 1000000 10708 ns/op 352 B/op 5 allocs/op
185
- BenchmarkRawParseCreateTable-4 466368 25662 ns/op 1120 B/op 5 allocs/op
186
- BenchmarkRawParseSelect1Parallel-4 13386709 894.4 ns/op 192 B/op 5 allocs/op
187
- BenchmarkRawParseSelect2Parallel-4 4188447 2871 ns/op 352 B/op 5 allocs/op
188
- BenchmarkRawParseCreateTableParallel-4 1758555 6809 ns/op 1120 B/op 5 allocs/op
189
- BenchmarkFingerprintSelect1-4 6139764 1970 ns/op 112 B/op 4 allocs/op
190
- BenchmarkFingerprintSelect2-4 2813995 4264 ns/op 112 B/op 4 allocs/op
191
- BenchmarkFingerprintCreateTable-4 1668691 7194 ns/op 112 B/op 4 allocs/op
192
- BenchmarkNormalizeSelect1-4 10068253 1189 ns/op 72 B/op 4 allocs/op
193
- BenchmarkNormalizeSelect2-4 6039188 1981 ns/op 104 B/op 4 allocs/op
194
- BenchmarkNormalizeCreateTable-4 4560278 2636 ns/op 184 B/op 4 allocs/op
176
+ pkg: github.com/pganalyze/pg_query_go/v6
177
+ BenchmarkParseSelect1-4 2874156 4186 ns/op 1040 B/op 18 allocs/op
178
+ BenchmarkParseSelect2-4 824781 14572 ns/op 2832 B/op 57 allocs/op
179
+ BenchmarkParseCreateTable-4 351037 34591 ns/op 8480 B/op 149 allocs/op
180
+ BenchmarkParseSelect1Parallel-4 9027080 1320 ns/op 1040 B/op 18 allocs/op
181
+ BenchmarkParseSelect2Parallel-4 2745390 4369 ns/op 2832 B/op 57 allocs/op
182
+ BenchmarkParseCreateTableParallel-4 1000000 10487 ns/op 8480 B/op 149 allocs/op
183
+ BenchmarkRawParseSelect1-4 3778771 3183 ns/op 128 B/op 3 allocs/op
184
+ BenchmarkRawParseSelect2-4 1000000 10985 ns/op 288 B/op 3 allocs/op
185
+ BenchmarkRawParseCreateTable-4 460714 26397 ns/op 1056 B/op 3 allocs/op
186
+ BenchmarkRawParseSelect1Parallel-4 13338790 902.7 ns/op 128 B/op 3 allocs/op
187
+ BenchmarkRawParseSelect2Parallel-4 4060762 2956 ns/op 288 B/op 3 allocs/op
188
+ BenchmarkRawParseCreateTableParallel-4 1709883 7001 ns/op 1056 B/op 3 allocs/op
189
+ BenchmarkFingerprintSelect1-4 6394882 1875 ns/op 48 B/op 2 allocs/op
190
+ BenchmarkFingerprintSelect2-4 2865390 4174 ns/op 48 B/op 2 allocs/op
191
+ BenchmarkFingerprintCreateTable-4 1688920 7143 ns/op 48 B/op 2 allocs/op
192
+ BenchmarkNormalizeSelect1-4 10604962 1133 ns/op 32 B/op 2 allocs/op
193
+ BenchmarkNormalizeSelect2-4 6226136 1938 ns/op 64 B/op 2 allocs/op
194
+ BenchmarkNormalizeCreateTable-4 4542387 2635 ns/op 144 B/op 2 allocs/op
195
195
PASS
196
- ok github.com/pganalyze/pg_query_go/v5 257.324s
196
+ ok github.com/pganalyze/pg_query_go/v6 258.376s
197
+
197
198
```
198
199
199
200
Note that allocation counts exclude the cgo portion, so they are higher than shown here.
0 commit comments