@@ -3,7 +3,7 @@ package postgresql
3
3
import (
4
4
"fmt"
5
5
6
- pg "github.com/pganalyze/pg_query_go/v4 "
6
+ pg "github.com/pganalyze/pg_query_go/v5 "
7
7
8
8
"github.com/sqlc-dev/sqlc/internal/sql/ast"
9
9
)
@@ -183,7 +183,6 @@ func convertAggref(n *pg.Aggref) *ast.Aggref {
183
183
Aggtype : ast .Oid (n .Aggtype ),
184
184
Aggcollid : ast .Oid (n .Aggcollid ),
185
185
Inputcollid : ast .Oid (n .Inputcollid ),
186
- Aggtranstype : ast .Oid (n .Aggtranstype ),
187
186
Aggargtypes : convertSlice (n .Aggargtypes ),
188
187
Aggdirectargs : convertSlice (n .Aggdirectargs ),
189
188
Args : convertSlice (n .Args ),
@@ -1663,7 +1662,6 @@ func convertGrantRoleStmt(n *pg.GrantRoleStmt) *ast.GrantRoleStmt {
1663
1662
GrantedRoles : convertSlice (n .GrantedRoles ),
1664
1663
GranteeRoles : convertSlice (n .GranteeRoles ),
1665
1664
IsGrant : n .IsGrant ,
1666
- AdminOpt : n .AdminOpt ,
1667
1665
Grantor : convertRoleSpec (n .Grantor ),
1668
1666
Behavior : ast .DropBehavior (n .Behavior ),
1669
1667
}
@@ -1693,7 +1691,6 @@ func convertGroupingFunc(n *pg.GroupingFunc) *ast.GroupingFunc {
1693
1691
Xpr : convertNode (n .Xpr ),
1694
1692
Args : convertSlice (n .Args ),
1695
1693
Refs : convertSlice (n .Refs ),
1696
- Cols : convertSlice (n .Cols ),
1697
1694
Agglevelsup : ast .Index (n .Agglevelsup ),
1698
1695
Location : int (n .Location ),
1699
1696
}
@@ -1754,7 +1751,6 @@ func convertIndexStmt(n *pg.IndexStmt) *ast.IndexStmt {
1754
1751
ExcludeOpNames : convertSlice (n .ExcludeOpNames ),
1755
1752
Idxcomment : makeString (n .Idxcomment ),
1756
1753
IndexOid : ast .Oid (n .IndexOid ),
1757
- OldNode : ast .Oid (n .OldNode ),
1758
1754
Unique : n .Unique ,
1759
1755
Primary : n .Primary ,
1760
1756
Isconstraint : n .Isconstraint ,
@@ -2016,7 +2012,6 @@ func convertOpExpr(n *pg.OpExpr) *ast.OpExpr {
2016
2012
return & ast.OpExpr {
2017
2013
Xpr : convertNode (n .Xpr ),
2018
2014
Opno : ast .Oid (n .Opno ),
2019
- Opfuncid : ast .Oid (n .Opfuncid ),
2020
2015
Opresulttype : ast .Oid (n .Opresulttype ),
2021
2016
Opretset : n .Opretset ,
2022
2017
Opcollid : ast .Oid (n .Opcollid ),
@@ -2108,7 +2103,7 @@ func convertPartitionSpec(n *pg.PartitionSpec) *ast.PartitionSpec {
2108
2103
return nil
2109
2104
}
2110
2105
return & ast.PartitionSpec {
2111
- Strategy : makeString (n .Strategy ),
2106
+ Strategy : makeString (n .Strategy . String () ),
2112
2107
PartParams : convertSlice (n .PartParams ),
2113
2108
Location : int (n .Location ),
2114
2109
}
@@ -2266,11 +2261,6 @@ func convertRangeTblEntry(n *pg.RangeTblEntry) *ast.RangeTblEntry {
2266
2261
Lateral : n .Lateral ,
2267
2262
Inh : n .Inh ,
2268
2263
InFromCl : n .InFromCl ,
2269
- RequiredPerms : ast .AclMode (n .RequiredPerms ),
2270
- CheckAsUser : ast .Oid (n .CheckAsUser ),
2271
- SelectedCols : makeUint32Slice (n .SelectedCols ),
2272
- InsertedCols : makeUint32Slice (n .InsertedCols ),
2273
- UpdatedCols : makeUint32Slice (n .UpdatedCols ),
2274
2264
SecurityQuals : convertSlice (n .SecurityQuals ),
2275
2265
}
2276
2266
}
@@ -2498,7 +2488,6 @@ func convertScalarArrayOpExpr(n *pg.ScalarArrayOpExpr) *ast.ScalarArrayOpExpr {
2498
2488
return & ast.ScalarArrayOpExpr {
2499
2489
Xpr : convertNode (n .Xpr ),
2500
2490
Opno : ast .Oid (n .Opno ),
2501
- Opfuncid : ast .Oid (n .Opfuncid ),
2502
2491
UseOr : n .UseOr ,
2503
2492
Inputcollid : ast .Oid (n .Inputcollid ),
2504
2493
Args : convertSlice (n .Args ),
0 commit comments