Skip to content

Commit 9b46d8f

Browse files
committed
set default encoding on embedded pg
1 parent e4664f9 commit 9b46d8f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/embedded-pg/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ func main() {
2121
Username("postgres").
2222
Password("postgres").
2323
Database("postgres").
24+
Encoding("UTF8").
2425
Port(uint32(5432)).
2526
Logger(os.Stdout),
2627
)
@@ -40,6 +41,7 @@ func main() {
4041
`ALTER SYSTEM SET max_connections = '1000';`,
4142
`ALTER SYSTEM SET shared_buffers = '1GB';`,
4243
`ALTER SYSTEM SET synchronous_commit = 'off';`,
44+
`ALTER SYSTEM SET client_encoding = 'UTF8';`,
4345
}
4446
db, err := sql.Open("postgres", "postgres://postgres:postgres@127.0.0.1:5432/postgres?sslmode=disable")
4547
if err != nil {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy