On Sat, Jun 07, 2003 at 11:32:33AM +0530, Rajesh wrote:

>Hi,
>
>Sometimes when I try to recreate a database using pg_dump I get the
>following error :
>
>--------------------------------------------
>ERROR:  copy: line 747, Invalid UNICODE character sequence found (0xd021)
>lost synchronization with server, resetting connection
>
>
>psql:dbcurrent.sql:11355: ERROR:  copy: line 747, Invalid UNICODE
>character sequence found
>(0xd021)
>psql:dbcurrent.sql:11355: lost synchronization with server, resetting
>connection
>--------------------------------------------

Got it. It was because of encoding. The server from which I was dumping
the DB was using SQL_ASCII encoding and on my debian machine encoding
was set as UNICODE.

I created the database using createdb -E SQL_ASCII -e <dbname> and it
worked.

Now on my debian machine if I create a database with createdb it creates
the database with default encoding as UNICODE. I searched postgres
configuration files but could not find out where this default encoding
is stored.

Since createdb creates the new database by taking the base from
/var/lib/postgres/data/base I checked there but since all the
subdirectories are numbers. Anybody knows from where this default
encoding is taken. I would like to change UNICODE to SQL_ASCII.

I even searched the env variables but nothing is there which points to
the above stuff.

Thanks in advance.


Till that time I will do

createdb -E SQL_ASCII -e <dbname>

Peace

--
Rajesh
:
####[ GNU/Linux One Stanza Tip (LOST) ]#######################

Sub : Command line shortcuts (clear)                 LOST #310

Tired of typing in "clear" every time you want the screen to
be cleared ? Press [Ctrl-L] ... This works for  most shells,
(except for ash, bsh and ksh)

####[rtorvi (at) vsnl.net]####################################
:


-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to