postgresql enconding.

S

SACHIN

Guest
HI,


how can i set encoding for postgresql tables and database?



Thank you,
 

nrm

Member
PartnerNOC
Jan 11, 2007
16
0
151
Moscow, Russia

casey

Well-Known Member
Jan 17, 2003
2,303
0
191
Code:
su - postgres
psql template1 postgres
update pg_database set encoding = pg_char_to_encoding('NEWENCODING');
After this, from now on all databases will be created with the new encoding. This only works, of course, if you want all databases to be the same encoding.
 

bryanabhay

Active Member
Aug 14, 2006
30
0
156
Hello,


But before doing this i am not able to

psql -U postgres -w

this command is not accepting the password

and hence i am unable to login as postgres user and do the other tasks ?

does anyone know why ?

~ Bryan