Обсуждение: About pg_dump

Поиск
Список
Период
Сортировка

About pg_dump

От
Daniel Henrique Alves Lima
Дата:
Hi, everybody !
   I don't know if this is the best list to ask this question but if it 
doesn't, please forgive me (should i try pgsl-general, maybe ?)...   We have a postgresql database in production and
i've2 questions 
 
about pg_dumpall boring me. We "dump" both ddl and data as SQL commands, 
so :
   1. Does the created sql script respect the database encoding (will 
chars be writen as utf-8 chars or iso-8859-1 char or ...) ?   2. We've a bytea in one table. What exactly happens with
thedumped 
 
data ? Is there any trouble with it ?
   I believe that we must to worry now (earlier). I don't want to 
expect until we must to restore database backup to descover that dumping 
data is corrupted :-)

                Thanks in advance !!!!



Re: About pg_dump

От
"Rute Solipa"
Дата:
hi,

i had to restore a database from a pg_dump and i'm having problems with the
encoding.
it seems that the pg_dump command doesn't keep the encoding information.
does anybody can help me resolve this problem.

thanks

rute



----- Original Message -----
From: "Daniel Henrique Alves Lima" <email_daniel_h@yahoo.com.br>
To: <pgsql-sql@postgresql.org>
Sent: Wednesday, March 10, 2004 11:00 PM
Subject: [SQL] About pg_dump


>     Hi, everybody !
>
>     I don't know if this is the best list to ask this question but if it
> doesn't, please forgive me (should i try pgsl-general, maybe ?)...
>     We have a postgresql database in production and i've 2 questions
> about pg_dumpall boring me. We "dump" both ddl and data as SQL commands,
> so :
>
>     1. Does the created sql script respect the database encoding (will
> chars be writen as utf-8 chars or iso-8859-1 char or ...) ?
>     2. We've a bytea in one table. What exactly happens with the dumped
> data ? Is there any trouble with it ?
>
>     I believe that we must to worry now (earlier). I don't want to
> expect until we must to restore database backup to descover that dumping
> data is corrupted :-)
>
>
>                  Thanks in advance !!!!
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
>




Re: About pg_dump

От
Tom Lane
Дата:
"Rute Solipa" <rutes@eselx.ipl.pt> writes:
> it seems that the pg_dump command doesn't keep the encoding information.

As of 7.4.2 it does emit a SET client_encoding.

In prior releases, if you are manually creating the destination database
then you need to be careful to create it with the same encoding as before.
        regards, tom lane


Re: About pg_dump

От
Daniel Henrique Alves Lima
Дата:
    I've made a test and it seems ok to me. I'm using utf-8 encoding 
under postgresql 7.3.3.

Tom Lane wrote:

>"Rute Solipa" <rutes@eselx.ipl.pt> writes:
>  
>
>>it seems that the pg_dump command doesn't keep the encoding information.
>>    
>>
>
>As of 7.4.2 it does emit a SET client_encoding.
>
>In prior releases, if you are manually creating the destination database
>then you need to be careful to create it with the same encoding as before.
>
>            regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>
>  
>