mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-04 10:31:02 +02:00
This new version allows importing data from all encodings.
Updated pgloader (a little hack: we transform to utf-8 every line we read into the datafile, if the user specified that this datafile is *not* in utf-8). Updated documentation with few words of explanation about the new .conf parameter "file_is_utf8"
This commit is contained in:
parent
0c1e04dfb3
commit
fe3a0480cc
@ -6,7 +6,9 @@ pgloader
|
||||
Jean-Paul Argudo <jean-paul.argudo@dalibo.com>
|
||||
|
||||
:Version:
|
||||
$Id: doc_pgloader.rest,v 1.1 2005-11-21 16:05:50 jpargudo Exp $
|
||||
$Id: doc_pgloader.rest,v 1.2 2006-03-28 21:39:25 jpargudo Exp $
|
||||
:Type:
|
||||
User manual
|
||||
|
||||
:Comment:
|
||||
pgLoader v.1.x documentation (install, usage and example)
|
||||
@ -132,12 +134,20 @@ The corresponding file "foo.conf" for the above datafile is the following: ::
|
||||
file_sepchar = ;
|
||||
#nulls = NULL
|
||||
quote = "
|
||||
file_is_utf8 = 0
|
||||
|
||||
Note that separation character is set to ";" and that quoting is specifyied
|
||||
with the character double-quote: "
|
||||
|
||||
Inserts will be commited each 1000, per blocks of 1000 rows at a time.
|
||||
|
||||
The datafile nor the database is in utf-8, so the parameter *file_is_utf8* is
|
||||
set to 0. Set it to 1 otherwise: when both database and datafile are in utf-8.
|
||||
|
||||
Since ``pgctl`` internals run in utf-8, the data must be converted *on the
|
||||
fly* to utf-8 when reading the datafile, thats why pgloader needs to know how
|
||||
is the datafile like, utf-8 or not.
|
||||
|
||||
|
||||
pgloader execution
|
||||
------------------
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# $Id: pgloader.conf,v 1.3 2005-11-21 16:05:50 jpargudo Exp $
|
||||
# $Id: pgloader.conf,v 1.4 2006-03-28 21:39:25 jpargudo Exp $
|
||||
# ----
|
||||
# Conversion parameter file for pgloader
|
||||
#
|
||||
@ -15,8 +15,22 @@
|
||||
|
||||
table_name = my_table
|
||||
table_columns = column1, column2, ...
|
||||
file_format = COPY # COPY or CSV or MSCSV
|
||||
|
||||
file_format = COPY
|
||||
# COPY or CSV or MSCSV
|
||||
|
||||
group_size = 1000
|
||||
# file_sepchar = ; # , (default) or ; or other
|
||||
# nulls = '' # NULL or '' or other
|
||||
# quote = " # how your strings are quoted in the CSV file
|
||||
|
||||
# file_sepchar = ;
|
||||
# , (default) or ; or other
|
||||
|
||||
# nulls = ''
|
||||
# NULL or '' or other
|
||||
|
||||
# quote = "
|
||||
# how your strings are quoted in the CSV file
|
||||
|
||||
file_is_utf8 = 0
|
||||
# how the datafile and database are encoded: utf8/unicode or not?
|
||||
# 0=NO # if utf8, both data file and
|
||||
# 1=YES # database must be in utf8
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user