[pgsql-jp: 40005] Re: postgreSQL 8.4.1のpsqlの漢字表示について

skond66 @ mail.goo.ne.jp skond66 @ mail.goo.ne.jp
2009年 10月 3日 (土) 11:42:26 JST


ありがとうございます。実行した結果は、以下のようになりまして、encode(a::bytea, 'hex')は
同じものが入っているように見えます。
なお、このテーブルの構造は
***=# \d test_data
      Table "public.test_data"
 Column |     Type      | Modifiers
--------+---------------+-----------
 a      | character(40) |

です。


psql (8.4.1)
Type "help" for help.

***=# select encode(a::bytea, 'hex'), a from test_data ;
                                              encode                                        
      |                      a

--------------------------------------------------------------------------------------------
------+--------------------------------------
--------
 336f6b6f6b3320202020202020202020202020202020202020202020202020202020202020202020           
      | 3okok3

 336f6b6f6b33e38182e38182e38182e381822020202020202020202020202020202020202020202020202020202
02020 |
 e2978b202020202020202020202020202020202020202020202020202020202020202020202020202020       
      | ○                                   

 efbca1202020202020202020202020202020202020202020202020202020202020202020202020202020       
      | A                                   

 61616161202020202020202020202020202020202020202020202020202020202020202020202020           
      | aaaa

 6161efbca261202020202020202020202020202020202020202020202020202020202020202020202020       
      | aaBa                                

 61612020202020202020202020202020202020202020202020202020202020202020202020202020           
      | aa

 61e382b3e383b361202020202020202020202020202020202020202020202020202020202020202020202020   
      | aコンa                               

 61e6988ee697a561202020202020202020202020202020202020202020202020202020202020202020202020   
      |
 61e6988ee697a561202020202020202020202020202020202020202020202020202020202020202020202020   
      |
(10 rows)



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 encode(a::bytea, 'hex'), a from test_data ;
                                              encode                                        
      |                      a               
--------------------------------------------------------------------------------------------
------+----------------------------------------------
 336f6b6f6b3320202020202020202020202020202020202020202020202020202020202020202020           
      | 3okok3                               
 336f6b6f6b33e38182e38182e38182e381822020202020202020202020202020202020202020202020202020202
02020 | 3okok3ああああ                       
 e2978b202020202020202020202020202020202020202020202020202020202020202020202020202020       
      | ○                                   
 efbca1202020202020202020202020202020202020202020202020202020202020202020202020202020       
      | A                                   
 61616161202020202020202020202020202020202020202020202020202020202020202020202020           
      | aaaa                                 
 6161efbca261202020202020202020202020202020202020202020202020202020202020202020202020       
      | aaBa                                
 61612020202020202020202020202020202020202020202020202020202020202020202020202020           
      | aa                                   
 61e382b3e383b361202020202020202020202020202020202020202020202020202020202020202020202020   
      | aコンa                               
 61e6988ee697a561202020202020202020202020202020202020202020202020202020202020202020202020   
      | a明日a                               
 61e6988ee697a561202020202020202020202020202020202020202020202020202020202020202020202020   
      | a明日a                               
(10 rows)



----- Original Message ----- 
送信者: Nakatsuka<tanpoko @ wk9.so-net.ne.jp>
宛先: pgsql-jp @ ml.postgresql.jp
日付:Saturday, October, 03, 2009, 10:56 AM
件名: [pgsql-jp: 40004] Re:postgreSQL 8.4.1のpsqlの漢字表示について

> 
> 
> 中司です。
>  #お茶を濁す程度ですが...
> 
> On 3 Oct 2009 09:36:44 +0900
> skond66 @ mail.goo.ne.jp wrote:
> 
> 
> > [***]$ /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;
> select encode(a::bytea, 'hex'), a from test_data ;
> 
> > 同じテーブルを8.3以前のpsqlで見に行きますと、以下のようになります。
> > 
> (snip)
> > ***=# select * from test_data;
> select encode(a::bytea, 'hex'), a from test_data ;
> 
> とすると違いは出ますか。
> 
> 
> 




pgsql-jp メーリングリストの案内