From 51c49193ddb089934b16665d6582e38e3424297b Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Mon, 5 Jul 2021 21:12:09 -0400 Subject: [PATCH] use binary params --- cmd/apollo-api/main.go | 2 +- cmd/apollo-worker/main.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/apollo-api/main.go b/cmd/apollo-api/main.go index b6bbcb0..085315e 100644 --- a/cmd/apollo-api/main.go +++ b/cmd/apollo-api/main.go @@ -40,7 +40,7 @@ func main() { dburl = os.Getenv("DATABASE_URL") } - db, err := sql.Open("postgres", dburl) + db, err := sql.Open("postgres", fmt.Sprintf("%s?binary_parameters=yes", dburl)) if err != nil { log.Fatal(err) } diff --git a/cmd/apollo-worker/main.go b/cmd/apollo-worker/main.go index 0747bf9..6dd7d75 100644 --- a/cmd/apollo-worker/main.go +++ b/cmd/apollo-worker/main.go @@ -2,6 +2,7 @@ package main import ( "database/sql" + "fmt" "log" "os" "os/signal" @@ -129,7 +130,7 @@ func main() { dburl = os.Getenv("DATABASE_URL") } - db, err := sql.Open("postgres", dburl) + db, err := sql.Open("postgres", fmt.Sprintf("%s?binary_parameters=yes", dburl)) if err != nil { log.Fatal(err) }