[GENERAL] pgsql cannot read utf8 files moved from windows correctly!

2007-12-20 Thread bookman bookman
H i, I copied a table in sqlserver2005 to a txt file(There were many chinese words in it).I saved it as a file encoded by ANSI,but I cant open it in ubuntu.I tried GBK,GB18030, UTF8,It just could not be opened. Then I save it in windows with encoding UTF8,then I can open it in ubuntu.I copied

Re: [GENERAL] How can I insert NULL into column with the type of timestamp?

2007-12-14 Thread bookman bookman
tell copy that > http://www.postgresql.org/docs/techdocs.15 > > So my guess is you should do > copy t_admin from "/home/postgres/data/admin.txt" USING DELIMITERS '\t' > WITH NULL As 'NULL' > > Hope that helps, > Regina > > > > -Origin

[GENERAL] How can i deal with "\n" when copy tables from sqlserver2005 to postgre?

2007-12-14 Thread bookman bookman
H i , I have solved the "insert NULL" problem,but another problem is feazing me now.I have a table t_book in sqlserver,I exported it to t_book.txt ,the column content has some special show( I made it purposely). --t_book.txt bookid(int)bookname(varchar(50)) content 1

[GENERAL] How can I insert NULL into column with the type of timestamp?

2007-12-12 Thread bookman bookman
H i , I want to tansfer a database from sqlserver2005 to postgresql8.2.5.I use bcp to export a table named admin in sqlserver to a text file: --table T_admin id name key regDate isLock realName 1 rison 9988