Skip to content

Commit a917364

Browse files
committed
postgresql: Generate all functions in pg_catalog
For now, generate this is a different file
1 parent 6298e0b commit a917364

File tree

9 files changed

+33284
-24
lines changed

9 files changed

+33284
-24
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@ test:
77
sqlc-dev:
88
go build -o ~/bin/sqlc-dev ./cmd/sqlc/
99

10+
sqlc-pg-gen:
11+
go build -o ~/bin/sqlc-pg-gen ./internal/tools/sqlc-pg-gen
12+
1013
regen: sqlc-dev
1114
./scripts/regenerate.sh

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ require (
77
github.com/davecgh/go-spew v1.1.1
88
github.com/go-sql-driver/mysql v1.5.0
99
github.com/google/go-cmp v0.4.0
10+
github.com/jackc/pgx/v4 v4.6.0
1011
github.com/jinzhu/inflection v1.0.0
1112
github.com/lfittl/pg_query_go v1.0.0
1213
github.com/lib/pq v1.4.0

go.sum

Lines changed: 82 additions & 0 deletions
Large diffs are not rendered by default.

internal/codegen/golang/postgresql_type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func postgresType(r *compiler.Result, col *compiler.Column, settings config.Comb
6565
}
6666
return "sql.NullString"
6767

68-
case "bool", "pg_catalog.bool":
68+
case "boolean", "bool", "pg_catalog.bool":
6969
if notNull {
7070
return "bool"
7171
}

0 commit comments

Comments
 (0)