diff --git a/doc/doc_pgloader.rest b/doc/doc_pgloader.rest index 97bfd80..92578d6 100644 --- a/doc/doc_pgloader.rest +++ b/doc/doc_pgloader.rest @@ -6,7 +6,9 @@ pgloader Jean-Paul Argudo :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 ------------------ diff --git a/pgloader.conf b/pgloader.conf index 54df66b..a432739 100644 --- a/pgloader.conf +++ b/pgloader.conf @@ -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