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 )
22
33Go version of https://github.com/pganalyze/pg_query
44
@@ -10,7 +10,7 @@ You can find further background to why a query's parse tree is useful here: http
1010## Installation
1111
1212```
13- go get github.com/pganalyze/pg_query_go/v5 @latest
13+ go get github.com/pganalyze/pg_query_go/v6 @latest
1414```
1515
1616Due 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
4444import (
4545 " fmt"
4646
47- pg_query " github.com/pganalyze/pg_query_go/v5 "
47+ pg_query " github.com/pganalyze/pg_query_go/v6 "
4848)
4949
5050func main () {
@@ -72,7 +72,7 @@ package main
7272import (
7373 " fmt"
7474
75- pg_query " github.com/pganalyze/pg_query_go/v5 "
75+ pg_query " github.com/pganalyze/pg_query_go/v6 "
7676)
7777
7878func main () {
@@ -98,7 +98,7 @@ package main
9898import (
9999 " fmt"
100100
101- pg_query " github.com/pganalyze/pg_query_go/v5 "
101+ pg_query " github.com/pganalyze/pg_query_go/v6 "
102102)
103103
104104func main () {
@@ -135,7 +135,7 @@ package main
135135import (
136136 " fmt"
137137
138- pg_query " github.com/pganalyze/pg_query_go/v5 "
138+ pg_query " github.com/pganalyze/pg_query_go/v6 "
139139)
140140
141141func main () {
@@ -173,27 +173,28 @@ go build -a
173173go test -test.bench=. -test.run=XXX -test.benchtime 10s -test.benchmem -test.cpu=4
174174goos: darwin
175175goarch: 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
195195PASS
196- ok github.com/pganalyze/pg_query_go/v5 257.324s
196+ ok github.com/pganalyze/pg_query_go/v6 258.376s
197+
197198```
198199
199200Note that allocation counts exclude the cgo portion, so they are higher than shown here.
0 commit comments