Re: pg_dump on local Windows, pg_restore on Linux?

From: "Phoenix Kiula" <phoenix(dot)kiula(at)gmail(dot)com>
To: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
Cc: "Postgres General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_dump on local Windows, pg_restore on Linux?
Date: 2007-08-15 17:53:11
Message-ID: e373d31e0708151053n11a6e151w28e8bace41b0f1d2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 16/08/07, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> wrote:
> On 8/15/07, Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com> wrote:
> > Couple of questions with porting:
> >
> > 1. I have been playing around with my databases locally on Win XP so
> > as not to hurt our website traffic. Now I would like to move the
> > database to a Linux CentOS server. Can I use pg_dump on Windows and
> > pg_restore it on Linux? If so, any tips on what I should keep in mind
> > (e.g., manual seems to suggest that pg_restore prefers tar gzipped
> > format...but I'm not sure if Windows can generate this?)
> >
> > 2. I would like my database to be UTF-8. I issue the command
> >
> > CREATE DATABASE mydb OWNER me ENCODING 'utf8';
> >
> > Should I add anything else to it, such as collation? I did not find
> > any option for that in here:
> > http://www.postgresql.org/docs/8.2/static/sql-createdatabase.html
> >
> > 3. Also, just to confirm, if I have utf-8 database, then all tables in
> > it should be able to take utf-8 data? I would just like these tables
> > to take whatever I send to them. No error checking or encoding
> > checking. Can I disable the painful error that PG keeps throwing if
> > even a single erroneous byte shows up? I'd rather have 'garbage data'
> > than not go through with the query.
>
> Requirements 2 and 3 are exclusive. Either you want your database to
> be UTF-8, which means that invalid byte sequences should be rejected
> because they AREN'T utf-8, or you want your database to swallow
> whatever you throw at it, in which case, that's not UTF-8.

Thanks. Is there an encoding that is so flexible that it will silently
accept whatever I send to it without throwing an exception?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Leif B. Kristensen 2007-08-15 17:53:45 Re: pg_dump on local Windows, pg_restore on Linux?
Previous Message madhtr 2007-08-15 17:45:59 Re: pqlib in c++: PQconnectStart PQconnectPoll