Thread: encoding issue with postgres 8.0

encoding issue with postgres 8.0

From
Kailash Vyas
Date:
hi

i am migrating from postgres 7.3.9 to 8.0.3
I am facing a issue with encoding.
By default  when i create new database it creates as UNICODE
In the earlier version the encoding was SQL_ASCII

so i am passing this variable while initializing the db directory

/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data -E SQL_ASCII

but i get this warning when I run it.

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale en_GB.UTF-8.
initdb: warning: encoding mismatch
The encoding you selected (SQL_ASCII) and the encoding that the selected
locale uses (UTF-8) are not known to match.  This may lead to
misbehavior in various character string processing functions.  To fix
this situation, rerun initdb and either do not specify an encoding
explicitly, or choose a matching combination.

what is the matching locale that i should be using in this case?


thanks,
kailash

Re: encoding issue with postgres 8.0

From
Tom Lane
Date:
Kailash Vyas <kailash.vyas@gmail.com> writes:
> The database cluster will be initialized with locale en_GB.UTF-8.
> initdb: warning: encoding mismatch
> The encoding you selected (SQL_ASCII) and the encoding that the selected
> locale uses (UTF-8) are not known to match. This may lead to
> misbehavior in various character string processing functions. To fix
> this situation, rerun initdb and either do not specify an encoding
> explicitly, or choose a matching combination.

> what is the matching locale that i should be using in this case?

If you want to use SQL_ASCII (ie, have no enforcement of encoding
validity) the only really safe locale is "C".  If you were using another
combination with your old database and not having trouble, you may
decide to ignore the warning and keep using that combination --- it'll
work just as well or badly as before.  But with what you have here,
if you ever accidentally put any non-UTF8 data into the database,
you'll likely get odd behavior.

            regards, tom lane

EnterpriseDB ?

From
Izoel Aguiar C
Date:
I just saw the  interview  made in LinuxWorld with Enterprisedb,   my
question is:  are they really supporting PostgreSQL like they claim?

Re: EnterpriseDB ?

From
"Joshua D. Drake"
Date:
Izoel Aguiar C wrote:

> I just saw the  interview  made in LinuxWorld with Enterprisedb,   my
> question is:  are they really supporting PostgreSQL like they claim?

Yes. They hired David Cramer, Jonah Harris and Alverro. They also
sponsored the community in their booth for LinuxWorld.

They are also supposedly giving code back for 8.2.

Sincerely,

Joshua D. Drake




>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>       choose an index scan if your joining column's datatypes do not
>       match