postgresql - Postgres databases with different encoding -


i tried create databases different encoding in postgres (i'm using pgadmin database manager), when try create database non utf8 encoding, pgadmin shows me error saying can't create database because not match current locale "portuguese_brazil_1252" , lc_ctype configuration requires encoding "win1252".

how configure in postgres? i'm running under locale test server windows xp (not choice). possible create databases different encoding or behavior postgres limitation? here had success managing that?

thanks

from docs:

the character set encoding specified new database must compatible chosen locale settings (lc_collate , lc_ctype). if locale c (or equivalently posix), encodings allowed, other locale settings there 1 encoding work properly. [...]

the encoding , locale settings must match of template database, except when template0 used template.

you should able use create database either (or both):

  • specifying template0 template (instead of default template1)

  • specifying correct lc_collate (try use lc_collate = 'c')

  • specifying correct lc_ctype = (try use lc_ctype = 'c' also)

you should add these settings create statement (and pgadmin lets main form window)

if don't know template0/template1 , want know, read here


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -