Skip to content

Commit

Permalink
Merge pull request #2 from aaron-siegel/utf8
Browse files Browse the repository at this point in the history
Set utf8 as default encoding for new databases
  • Loading branch information
orm011 authored Apr 8, 2024
2 parents f650c62 + e99454f commit 4943322
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pgserver" # Required
version = "0.0.7" # Required
version = "0.0.9" # Required
description = "Self-contained postgres server for your python applications" # Required
readme = "README.md" # Optional
requires-python = ">=3.9"
Expand Down
2 changes: 1 addition & 1 deletion src/pgserver/postgres_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def ensure_pgdata_inited(self) -> None:
pwd.getpwnam(self.system_user).pw_gid)

if not (self.pgdata / 'PG_VERSION').exists():
initdb(['--auth=trust', '--auth-local=trust', '-U', self.postgres_user], pgdata=self.pgdata,
initdb(['--auth=trust', '--auth-local=trust', '--encoding=utf8', '-U', self.postgres_user], pgdata=self.pgdata,
user=self.system_user)

def ensure_postgres_running(self) -> None:
Expand Down

0 comments on commit 4943322

Please sign in to comment.