dbTalk Databases Forums  

[BUGS] copy command PANIC in --encoding='utf8' createdb option

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] copy command PANIC in --encoding='utf8' createdb option in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sil Lee
 
Posts: n/a

Default [BUGS] copy command PANIC in --encoding='utf8' createdb option - 10-29-2004 , 12:50 PM






I installed PostgreSQL-8.0beta4 on Linux Fedora Core2.

and first I made database test1. and create table t1, copy data from
file 'test.dmp'
$ createdb test1
CREATE DATABASE

$psql test1
test1=3D> create table t1 (col1 varchar(100));
CREATE TABLE
test1=3D> show client_encoding;
client_encoding
-----------------
EUC_KR
(1 row)

and load data from 'test.dmp' file
test1=3D> \copy t1 (col1) from '/tmp/test.dmp'
\.
ERROR: invalid byte sequence for encoding "EUC_KR": 0xb85f
CONTEXT: COPY t1, line 1, column col1: "/system/workbin/=EB=93=B1=EB=9D=BD=
=EC=A2=85??.TXT.20040319"
test1=3D>

the test.dmp file is
$ cat test.dmp
/system/workbin/=EB=93=B1=EB=9D=BD=EC=A2=85??.TXT.20040319
$ od -h test.dmp
0000000 732f 7379 6574 2f6d 6f77 6b72 6962 2f6e
0000020 eeb5 f4b6 bec1 5fb8 5fbc 542e 5458 322e
0000040 3030 3034 3133 0a39
0000050

the first cast is good..=20
but second case, creatdb with --encoding=3D'utf8'

$ createdb test1 --encoding=3D'utf8'
CREATE DATABASE

$ psql test1
test1=3D> show client_encoding;
client_encoding
-----------------
UNICODE
(1 row)
test1=3D> set client_encoding =3D 'uhc';
SET
test1=3D> \copy t1 (col1) from '/opt/lgsec/dmp/test.dmp'
\.
PANIC: ERRORDATA_STACK_SIZE exceeded
test1=3D>

^^; postmaster log=20
WARNING: ignoring unconvertible UHC character 0xb85f
CONTEXT: COPY t1, line 1: "/system/workbin/=EB=93=B1=EB=9D=BD=EC=A2=85??.T=
XT.20040319"
WARNING: ignoring unconvertible UTF-8 character 0xeeb6f4
CONTEXT: COPY t1, line 1: "/system/workbin/=EB=93=B1=EB=9D=BD=EC=A2=85??.T=
XT.20040319"
WARNING: ignoring unconvertible UTF-8 character 0xeeb6f4
CONTEXT: COPY t1, line 1: "/system/workbin/=EB=93=B1=EB=9D=BD=EC=A2=85??.T=
XT.20040319"
WARNING: ignoring unconvertible UTF-8 character 0xeeb6f4
CONTEXT: COPY t1, line 1: "/system/workbin/=EB=93=B1=EB=9D=BD=EC=A2=85??.T=
XT.20040319"
WARNING: ignoring unconvertible UTF-8 character 0xeeb6f4
CONTEXT: COPY t1, line 1: "/system/workbin/=EB=93=B1=EB=9D=BD=EC=A2=85??.T=
XT.20040319"
PANIC: ERRORDATA_STACK_SIZE exceeded
STATEMENT: COPY t1 (col1) FROM STDIN
LOG: server process (PID 23319) was terminated by signal 6
LOG: terminating any other active server processes
LOG: all server processes terminated; reinitializing
LOG: database system was interrupted at 2004-10-27 10:39:57 KST
LOG: checkpoint record is at 0/CEB2D04
LOG: redo record is at 0/CEB2D04; undo record is at 0/0; shutdown TRUE
LOG: next transaction ID: 3151; next OID: 1794894
LOG: database system was not properly shut down; automatic recovery in pro=
gress
LOG: record with zero length at 0/CEB2D40
LOG: redo is not required
LOG: database system is ready


It may be encoding problem ... but i can' slove it.. sorry..
How can I copy from the test.dmp file..?

thank you very much in advance! have a nice day
everyone!

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] copy command PANIC in --encoding='utf8' createdb option - 10-29-2004 , 02:34 PM






Sil Lee <leesil (AT) gmail (DOT) com> writes:
Quote:
test1=> \copy t1 (col1) from '/opt/lgsec/dmp/test.dmp'
\.
PANIC: ERRORDATA_STACK_SIZE exceeded
test1=

^^; postmaster log
WARNING: ignoring unconvertible UHC character 0xb85f
CONTEXT: COPY t1, line 1: "/system/workbin/등락종??.TXT.20040319"
WARNING: ignoring unconvertible UTF-8 character 0xeeb6f4
CONTEXT: COPY t1, line 1: "/system/workbin/등락종??.TXT.20040319"
WARNING: ignoring unconvertible UTF-8 character 0xeeb6f4
Good catch. It's trying to reverse-convert the COPY data line from server
encoding back to client encoding, which would be fine except the line is
still in client encoding :-(. I think we'll have to skip providing the
actual data line contents in this scenario.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.