Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9b46d8f

Browse files
committed
set default encoding on embedded pg
1 parente4664f9 commit9b46d8f

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
iferr!=nil {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp