[pgsql-jp: 40003] Re: postgreSQL 8.4.1のpsqlの漢字表示について
skond66 @ mail.goo.ne.jp
skond66 @ mail.goo.ne.jp
2009年 10月 3日 (土) 09:36:44 JST
色々とありがとうございます。漢字の扱いについて詳しくなく、申し訳ありません。
実際のパラメータは、以下のようになっております。足りないパラメータや設定があれば
また、ご指摘ください。
show server_encoding;
server_encoding
-----------------
UTF8
show client_encoding ;
client_encoding
-----------------
sjis
SELECT name, setting, context FROM pg_settings WHERE name LIKE 'lc%';
name | setting | context
-------------+------------+-----------
lc_collate | ja_JP.utf8 | internal
lc_ctype | ja_JP.utf8 | internal
lc_messages | C | superuser
lc_monetary | C | user
lc_numeric | C | user
lc_time | C | user
という状態です。8.4.1のpsqlで、テストで作ったテーブルを見ますと、以下のように漢字が
出てきません。
[***]$ /usr/local/src/postgresql-8.4.1/src/bin/psql/psql test (psql test でも同様)
psql (8.4.1)
Type "help" for help.
***=# select * from test_data;
a
----------------------------------------------
3okok3
○
A
aaaa
aaBa
aa
aコンa
(10 rows)
同じテーブルを8.3以前のpsqlで見に行きますと、以下のようになります。
[***]$ /usr/local/src/postgresql-8.3.1/src/bin/psql/psql test
Welcome to psql 8.3.1 (server 8.4.1), 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
WARNING: You are connected to a server with major version 8.4,
but your psql client is major version 8.3. Some backslash commands,
such as \d, might not work properly.
***=# select * from test_data;
a
----------------------------------------------
3okok3
3okok3ああああ
○
A
aaaa
aaBa
aa
aコンa
a明日a
a明日a
(10 rows)
>
>
> 中司です。
>
> On Fri, 2 Oct 2009 02:26:49 +0900
> Ishikawa Toshiyuki <tosiyuki @ gol.com> wrote:
>
> > サーバエンコーディングでSJISはサポートされていません。
> > http://www.postgresql.jp/document/pg841doc/html/multibyte.html#MULTIBYTE-CHARSET-SUPPORT
ED
> ご教示有難うございます。
>
> ですよね。
>
> 実は、このページ参照してたのですが、
> (1)元投稿の記述に「格納文字:shift-jis」とある。(意味を取り違えてる?)
> (2)pgadmin3(Windows版/Linux版共)では新規DB作成時にSJIS指定可能
> # 指定可能というだけで実際に試すと(サーバ:8.3.8/8.4.1共に)NGでした。
> # Windows版のpgadmin3はPostgres8.4.1付属です
>
> と言う事で、「もしかして何か手段があるのかな?」と...
>
>
>
>
pgsql-jp メーリングリストの案内