Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 23rd, 2005, 01:11 AM
joseph speigle
Guest
 
Posts: n/a
Default korean encoding, sort order off anyhow

hi,
To see the query results in native language see

http://database.sarang.net/?inc=read...eyword=&page=1

the simpler url is

http://database.sarang.net/?criteria=pgsql

becase there is no korean postgresql list. poster is "joesp"

basically the characters are off when sorting. As for how the koreans are doing things, that's why I'm asking them on database.sarang.net. BTW is there another location to look for help in korea, if you are aware of one I would like to know it.

I am at a crossroads why after the following the sort order is off. I think I've followed all the advice from the manual, as well.


[postgres@www pgsql]$ initdb --locale=ko_KR --lc-messages=C -E unicode -D `pwd`/unidata

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 locales
COLLATE: ko_KR
CTYPE: ko_KR
MESSAGES: C
MONETARY: ko_KR
NUMERIC: ko_KR
TIME: ko_KR

creating directory /bup/pgsql/unidata ... ok
creating directory /bup/pgsql/unidata/global ... ok
creating directory /bup/pgsql/unidata/pg_xlog ... ok
creating directory /bup/pgsql/unidata/pg_clog ... ok
creating directory /bup/pgsql/unidata/base ... ok
creating directory /bup/pgsql/unidata/base/1 ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 1000
creating configuration files ... ok
creating template1 database in /bup/pgsql/unidata/base/1 ... ok
initializing pg_shadow ... ok
enabling unlimited row size for system tables ... ok
initializing pg_depend ... ok
creating system views ... ok
loading pg_description ... ok
creating conversions ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok

Success. You can now start the database server using:

/usr/local/pgsql/bin/postmaster -D /bup/pgsql/unidata
or
/usr/local/pgsql/bin/pg_ctl -D /bup/pgsql/unidata -l logfile start

[postgres@www pgsql]$
[postgres@www pgsql]$ pg_ctl -D /bup/pgsql/unidata/ -o "-p5433" start
postmaster starting
[postgres@www pgsql]$ LOG: database system was shut down at 2004-06-16 15:57:34 CDT
LOG: checkpoint record is at 0/9F60DC
LOG: redo record is at 0/9F60DC; undo record is at 0/0; shutdown TRUE
LOG: next transaction ID: 490; next OID: 17207
LOG: database system is ready
[postgres@www pgsql]$
[postgres@www pgsql]$ psql -p 5543 -d template1
Welcome to psql 7.5devel, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

template1=# \dt
No relations found.
template1=#create database korean;
CREATE DATABASE
template1=\c korean
template1=\q
[postgres@www bup]$ psql -p 5543 -d korean < korean.sql
..... many insert statements, etc, as korean.sql is dump of other korean db
[postgres@www bup]$ psql -p 5543 -d korean
Welcome to psql 7.5devel, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

korean=#
korean=# \encoding utf8
korean=# select id,word from korean order by word;
id | word
----+----------
68 | 생성
72 | 두가지
67 | 설문
69 | 단순하게
66 | 강좌
73 | 깔다
65 | 막막
70 | 반면
71 | 지*
(9 rows)

korean=# \encoding unicode
korean=# select id,word from korean order by word;
id | word
----+----------
68 | 생성
72 | 두가지
67 | 설문
69 | 단순하게
66 | 강좌
73 | 깔다
65 | 막막
70 | 반면
71 | 지*
(9 rows)
(the order is incorrect and unsorted)
korean-# \l
List of databases
Name | Owner | Encoding
-----------+----------+----------
korean | postgres | UNICODE
template0 | postgres | UNICODE
template1 | postgres | UNICODE
(3 rows)

korean-#




--
joe speigle
www.sirfsup.com

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles