From: | Sergey Konoplev <gray(dot)ru(at)gmail(dot)com> |
---|---|
To: | Andre Lopes <lopes80andre(at)gmail(dot)com> |
Cc: | postgresql Forums <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How to change the file encoding of a 3gb file? |
Date: | 2010-07-19 06:19:45 |
Message-ID: | AANLkTikMvjyeSICmfGcAd6aLsH3GexOqhAp2k1EnBlfu@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I'm just guessing.
If you have a database in UTF8 and your SQL-file in some encoding so
what about doing this:
1. Connect to your database using psql
$ psql -p ... -h ... -U ... your_database
2. Set client encoding to the encoding of your SQL-file
yourdb=# \encoding your_sql_encoding
3. Load the SQL-file
\i your_sql_file
On 19 July 2010 01:51, Andre Lopes <lopes80andre(at)gmail(dot)com> wrote:
> Hi,
>
> I'am trying to import an SQL file with 3gb of INSERTS. I must to change the
> encode of the file to UTF8, how can I change the encode of the file without
> open it? This 3gb file crashes every program...
>
> Give me a clue.
>
> Best Regards,
>
>
--
Sergey Konoplev
Blog: http://gray-hemp.blogspot.com /
Linkedin: http://ru.linkedin.com/in/grayhemp /
JID/GTalk: gray(dot)ru(at)gmail(dot)com / Skype: gray-hemp / ICQ: 29353802
From | Date | Subject | |
---|---|---|---|
Next Message | tuanhoanganh | 2010-07-19 09:15:59 | Rescue data after power off |
Previous Message | Craig Ringer | 2010-07-19 02:01:04 | Re: xpath index not being used |