Skip to content

postgresql: Generate the functions in pg_catalog #550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ test:
sqlc-dev:
go build -o ~/bin/sqlc-dev ./cmd/sqlc/

sqlc-pg-gen:
go build -o ~/bin/sqlc-pg-gen ./internal/tools/sqlc-pg-gen

regen: sqlc-dev
./scripts/regenerate.sh
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ require (
github.com/davecgh/go-spew v1.1.1
github.com/go-sql-driver/mysql v1.5.0
github.com/google/go-cmp v0.4.0
github.com/jackc/pgx/v4 v4.6.0
github.com/jinzhu/inflection v1.0.0
github.com/lfittl/pg_query_go v1.0.0
github.com/lib/pq v1.4.0
Expand Down
82 changes: 82 additions & 0 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion internal/codegen/golang/postgresql_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func postgresType(r *compiler.Result, col *compiler.Column, settings config.Comb
}
return "sql.NullString"

case "bool", "pg_catalog.bool":
case "boolean", "bool", "pg_catalog.bool":
if notNull {
return "bool"
}
Expand Down
Loading