@@ -3,7 +3,7 @@ package postgresql
33import (
44 "fmt"
55
6- pg "github.com/pganalyze/pg_query_go/v4 "
6+ pg "github.com/pganalyze/pg_query_go/v5 "
77
88 "github.com/sqlc-dev/sqlc/internal/sql/ast"
99)
@@ -183,7 +183,6 @@ func convertAggref(n *pg.Aggref) *ast.Aggref {
183183 Aggtype : ast .Oid (n .Aggtype ),
184184 Aggcollid : ast .Oid (n .Aggcollid ),
185185 Inputcollid : ast .Oid (n .Inputcollid ),
186- Aggtranstype : ast .Oid (n .Aggtranstype ),
187186 Aggargtypes : convertSlice (n .Aggargtypes ),
188187 Aggdirectargs : convertSlice (n .Aggdirectargs ),
189188 Args : convertSlice (n .Args ),
@@ -1663,7 +1662,6 @@ func convertGrantRoleStmt(n *pg.GrantRoleStmt) *ast.GrantRoleStmt {
16631662 GrantedRoles : convertSlice (n .GrantedRoles ),
16641663 GranteeRoles : convertSlice (n .GranteeRoles ),
16651664 IsGrant : n .IsGrant ,
1666- AdminOpt : n .AdminOpt ,
16671665 Grantor : convertRoleSpec (n .Grantor ),
16681666 Behavior : ast .DropBehavior (n .Behavior ),
16691667 }
@@ -1693,7 +1691,6 @@ func convertGroupingFunc(n *pg.GroupingFunc) *ast.GroupingFunc {
16931691 Xpr : convertNode (n .Xpr ),
16941692 Args : convertSlice (n .Args ),
16951693 Refs : convertSlice (n .Refs ),
1696- Cols : convertSlice (n .Cols ),
16971694 Agglevelsup : ast .Index (n .Agglevelsup ),
16981695 Location : int (n .Location ),
16991696 }
@@ -1754,7 +1751,6 @@ func convertIndexStmt(n *pg.IndexStmt) *ast.IndexStmt {
17541751 ExcludeOpNames : convertSlice (n .ExcludeOpNames ),
17551752 Idxcomment : makeString (n .Idxcomment ),
17561753 IndexOid : ast .Oid (n .IndexOid ),
1757- OldNode : ast .Oid (n .OldNode ),
17581754 Unique : n .Unique ,
17591755 Primary : n .Primary ,
17601756 Isconstraint : n .Isconstraint ,
@@ -2016,7 +2012,6 @@ func convertOpExpr(n *pg.OpExpr) *ast.OpExpr {
20162012 return & ast.OpExpr {
20172013 Xpr : convertNode (n .Xpr ),
20182014 Opno : ast .Oid (n .Opno ),
2019- Opfuncid : ast .Oid (n .Opfuncid ),
20202015 Opresulttype : ast .Oid (n .Opresulttype ),
20212016 Opretset : n .Opretset ,
20222017 Opcollid : ast .Oid (n .Opcollid ),
@@ -2108,7 +2103,7 @@ func convertPartitionSpec(n *pg.PartitionSpec) *ast.PartitionSpec {
21082103 return nil
21092104 }
21102105 return & ast.PartitionSpec {
2111- Strategy : makeString (n .Strategy ),
2106+ Strategy : makeString (n .Strategy . String () ),
21122107 PartParams : convertSlice (n .PartParams ),
21132108 Location : int (n .Location ),
21142109 }
@@ -2266,11 +2261,6 @@ func convertRangeTblEntry(n *pg.RangeTblEntry) *ast.RangeTblEntry {
22662261 Lateral : n .Lateral ,
22672262 Inh : n .Inh ,
22682263 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 ),
22742264 SecurityQuals : convertSlice (n .SecurityQuals ),
22752265 }
22762266}
@@ -2498,7 +2488,6 @@ func convertScalarArrayOpExpr(n *pg.ScalarArrayOpExpr) *ast.ScalarArrayOpExpr {
24982488 return & ast.ScalarArrayOpExpr {
24992489 Xpr : convertNode (n .Xpr ),
25002490 Opno : ast .Oid (n .Opno ),
2501- Opfuncid : ast .Oid (n .Opfuncid ),
25022491 UseOr : n .UseOr ,
25032492 Inputcollid : ast .Oid (n .Inputcollid ),
25042493 Args : convertSlice (n .Args ),
0 commit comments