[pgsql-jp: 36612] Re: duplication エラー(UNICODE文字列)

Takao Kato sirius @ jp.fujitsu.com
2006年 1月 12日 (木) 09:15:16 JST


加藤@川崎です。


At Wed, 11 Jan 2006 20:07:35 +0900,
keigo ito wrote:
> 
> (2) 以下のSQLを実行
..snip..
>http://k5ito.hp.infoseek.co.jp/data/duplicate.sql.txt  からDownload可能です。

kato% cd /tmp
kato% wget http://k5ito.hp.infoseek.co.jp/data/duplicate.sql.txt
kato% createdb -E UNICODE unicode
kato% psql unicode
Welcome to psql 8.1.0, 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

unicode=# \i /tmp/duplicate.sql.txt
psql:/tmp/duplicate.sql.txt:1: ERROR:  index "tb_str_key" does not exist
psql:/tmp/duplicate.sql.txt:2: ERROR:  table "tb" does not exist
psql:/tmp/duplicate.sql.txt:8: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "tb_pkey" for table "tb"
CREATE TABLE
CREATE INDEX
code=# select * from tb;
  pid  |  str
-------+--------
 12345 | ONE
  6789 | BBB
(2 rows)

unicode=#

正しく動いています。では何故伊藤さんの環境で問題が発生するのか?
あくまで想像で書きますが、

	initdb時に --no-locale を指定していない!

に1000点。

それでは
-------------------------------------------------------------
加藤@川崎



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