mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-06 22:37:02 +02:00
Square brackets around source field options are now mandatory.
This commit is contained in:
parent
2f49c9614c
commit
08fc7fd092
@ -775,7 +775,7 @@ How many bytes to read from the \fIstart\fR position to read that field\'s value
|
||||
.IP "" 0
|
||||
.
|
||||
.IP
|
||||
Those optional parameters can enclosed in square brackets and comma\-separated:
|
||||
Those optional parameters must be enclosed in square brackets and comma\-separated:
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\fIterminated by\fR
|
||||
|
@ -668,7 +668,7 @@ The `fixed` format command accepts the following clauses and options:
|
||||
How many bytes to read from the *start* position to read that
|
||||
field's value. Same format as *start*.
|
||||
|
||||
Those optional parameters can enclosed in square brackets and
|
||||
Those optional parameters must be enclosed in square brackets and
|
||||
comma-separated:
|
||||
|
||||
- *terminated by*
|
||||
|
@ -1743,7 +1743,7 @@ load database
|
||||
(declare (ignore open close))
|
||||
(alexandria:alist-plist `(,opt1 ,@opts)))))
|
||||
|
||||
(defrule csv-field-options (? (or csv-field-option csv-field-option-list)))
|
||||
(defrule csv-field-options (? csv-field-option-list))
|
||||
|
||||
(defrule csv-raw-field-name (and (or #\_ (alpha-char-p character))
|
||||
(* (or (alpha-char-p character)
|
||||
|
@ -19,13 +19,13 @@ LOAD ARCHIVE
|
||||
(
|
||||
locId,
|
||||
country,
|
||||
region null if blanks,
|
||||
city null if blanks,
|
||||
postalCode null if blanks,
|
||||
region [ null if blanks ],
|
||||
city [ null if blanks ],
|
||||
postalCode [ null if blanks ],
|
||||
latitude,
|
||||
longitude,
|
||||
metroCode null if blanks,
|
||||
areaCode null if blanks
|
||||
metroCode [ null if blanks ],
|
||||
areaCode [ null if blanks ]
|
||||
)
|
||||
INTO postgresql:///ip4r?geolite.location
|
||||
(
|
||||
|
@ -1,5 +1,5 @@
|
||||
LOAD CSV
|
||||
FROM INLINE (id, number null if '\N', data)
|
||||
FROM INLINE (id, number [null if '\N'], data)
|
||||
INTO postgresql:///pgloader?nullif
|
||||
|
||||
BEFORE LOAD DO
|
||||
|
BIN
test/xzero.load
BIN
test/xzero.load
Binary file not shown.
Loading…
Reference in New Issue
Block a user