From 735cdc8fdcf3feccc2b1245573ca0aadd4bd5b7e Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Tue, 8 Dec 2015 21:03:55 +0100 Subject: [PATCH] Document the remove-null-characters transform. Both as a new transformation function available, and as the default for Text conversions when coming from MySQL. See #258, Fixes #219. --- pgloader.1 | 22 ++++++++++++++-------- pgloader.1.md | 18 +++++++++++------- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/pgloader.1 b/pgloader.1 index ff5438a..3403249 100644 --- a/pgloader.1 +++ b/pgloader.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "PGLOADER" "1" "November 2015" "ff" "" +.TH "PGLOADER" "1" "December 2015" "ff" "" . .SH "NAME" \fBpgloader\fR \- PostgreSQL data loader @@ -2139,22 +2139,22 @@ type decimal to decimal keep typemod Texts: . .IP "\(bu" 4 -type char to varchar keep typemod +type char to varchar keep typemod using remove\-null\-characters . .IP "\(bu" 4 -type varchar to text +type varchar to text using remove\-null\-characters . .IP "\(bu" 4 -type tinytext to text +type tinytext to text using remove\-null\-characters . .IP "\(bu" 4 -type text to text +type text to text using remove\-null\-characters . .IP "\(bu" 4 -type mediumtext to text +type mediumtext to text using remove\-null\-characters . .IP "\(bu" 4 -type longtext to text +type longtext to text using remove\-null\-characters . .IP "" 0 . @@ -2848,12 +2848,18 @@ Out: "{foo,bar}" Convert an empty string to a null\. . .IP "\(bu" 4 -\fIright\-trimg\fR +\fIright\-trim\fR . .IP Remove whitespace at end of string\. . .IP "\(bu" 4 +\fIremove\-null\-characters\fR +. +.IP +Remove \fBNUL\fR characters (\fB0x0\fR) from given strings\. +. +.IP "\(bu" 4 \fIbyte\-vector\-to\-bytea\fR . .IP diff --git a/pgloader.1.md b/pgloader.1.md index 19315b9..8425672 100644 --- a/pgloader.1.md +++ b/pgloader.1.md @@ -1791,12 +1791,12 @@ Numbers: Texts: - - type char to varchar keep typemod - - type varchar to text - - type tinytext to text - - type text to text - - type mediumtext to text - - type longtext to text + - type char to varchar keep typemod using remove-null-characters + - type varchar to text using remove-null-characters + - type tinytext to text using remove-null-characters + - type text to text using remove-null-characters + - type mediumtext to text using remove-null-characters + - type longtext to text using remove-null-characters Binary: @@ -2230,10 +2230,14 @@ The provided transformation functions are: Convert an empty string to a null. - - *right-trimg* + - *right-trim* Remove whitespace at end of string. + - *remove-null-characters* + + Remove `NUL` characters (`0x0`) from given strings. + - *byte-vector-to-bytea* Transform a simple array of unsigned bytes to the PostgreSQL bytea Hex