Skip to content

Commit 166725c

Browse files
committed
Fixed cidr type fo pq
1 parent 375ec62 commit 166725c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ require (
3535
github.com/jackc/pgproto3/v2 v2.3.1 // indirect
3636
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
3737
github.com/jackc/pgtype v1.12.0
38-
github.com/kr/pretty v0.2.1 // indirect
3938
github.com/pingcap/errors v0.11.5-0.20210425183316-da1aaba5fb63 // indirect
4039
github.com/pingcap/log v0.0.0-20210906054005-afc726e70354 // indirect
4140
github.com/pingcap/tidb/parser v0.0.0-20220725134311-c80026e61f00

internal/codegen/golang/postgresql_type.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,8 @@ func postgresType(req *plugin.CodeGenRequest, col *plugin.Column) string {
297297
}
298298
return "*netip.Prefix"
299299
case SQLDriverPGXV4:
300+
return "pgtype.CIDR"
301+
case SQLDriverLibPQ:
300302
return "pqtype.CIDR"
301303
default:
302304
return "interface{}"

0 commit comments

Comments
 (0)