Skip to content

Commit f4cef4d

Browse files
committed
Fixed cidr type fo pq
1 parent 9b397b7 commit f4cef4d

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
@@ -251,6 +251,8 @@ func postgresType(req *plugin.CodeGenRequest, col *plugin.Column) string {
251251
}
252252
return "*netip.Prefix"
253253
case SQLDriverPGXV4:
254+
return "pgtype.CIDR"
255+
case SQLDriverLibPQ:
254256
return "pqtype.CIDR"
255257
default:
256258
return "interface{}"

0 commit comments

Comments
 (0)