Opened 14 years ago
Closed 13 years ago
#17207 closed Bug (fixed)
create_template_postgis-debian.sh cant use UTF8 on PostgreSQL 8.4
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | GIS | Version: | dev |
| Severity: | Normal | Keywords: | postgis |
| Cc: | john@… | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Script create_template_postgis-debian.sh tested on Debian Squeeze:
createdb: database creation failed: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
To fix this script specify non default template to use by createdb:
createdb -E UTF8 --template=template0 template_postgis && \
Attachments (2)
Change History (5)
by , 14 years ago
| Attachment: | create_template_postgis-debian.sh.patch added |
|---|
comment:1 by , 14 years ago
| Patch needs improvement: | set |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
I think this depends on how the template0 and template1 database were created, which in turn depends on your locale.
I use GeoDjango on stock Debian Squeeze, and I never encountered that problem, probably because my locale is en_US.UTF-8.
Rather than editing the script, I think we should document the issue and provide resolution steps. See http://jacobian.org/writing/pg-encoding-ubuntu/.
by , 14 years ago
| Attachment: | 17207-docs.patch added |
|---|
Documentation patch to note issue & workaround
comment:2 by , 14 years ago
| Cc: | added |
|---|---|
| Patch needs improvement: | unset |
I agree with aaugustin. I have occasionally encountered this bug if the OS's locale is not en-us.UTF8 (or similar). Vagrant seems to only use "en-us" in their lucid base boxes.
Attached is a patch with adds a troubleshooting note to the documentation and links to Jacob's workaround.
comment:3 by , 13 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Patch for create_template_postgis-debian.sh