From a0518f2e986230071972069ed2dd4280a4b11cdd Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Mon, 26 May 2014 11:04:49 +0200 Subject: [PATCH] Document FILENAMES MATCHING option. --- pgloader.1 | 19 +++++++++++++++++++ pgloader.1.md | 11 +++++++++++ 2 files changed, 30 insertions(+) diff --git a/pgloader.1 b/pgloader.1 index 1ca323f..4cd029a 100644 --- a/pgloader.1 +++ b/pgloader.1 @@ -454,6 +454,25 @@ The data is found after the end of the parsed commands\. Any number of empty lin .IP Reads the data from the standard input stream\. . +.IP "\(bu" 4 +\fIFILENAMES MATCHING\fR +. +.IP +The whole \fImatching\fR clause must follow the following rule: +. +.IP "" 4 +. +.nf + +[ ALL FILENAMES | [ FIRST ] FILENAME ] MATCHING ~<> +. +.fi +. +.IP "" 0 +. +.IP +The \fImatching\fR clause applies given \fIregular expression\fR (see above for exact syntax, several options can be used here) to filenames\. It\'s then possible to load data from only the first match of all of them\. +. .IP "" 0 . .IP diff --git a/pgloader.1.md b/pgloader.1.md index 263e028..ff2deaf 100644 --- a/pgloader.1.md +++ b/pgloader.1.md @@ -400,6 +400,17 @@ The `csv` format command accepts the following clauses and options: Reads the data from the standard input stream. + - *FILENAMES MATCHING* + + The whole *matching* clause must follow the following rule: + + [ ALL FILENAMES | [ FIRST ] FILENAME ] MATCHING ~<> + + The *matching* clause applies given *regular expression* (see above + for exact syntax, several options can be used here) to filenames. + It's then possible to load data from only the first match of all of + them. + The *FROM* option also supports an optional comma separated list of *field* names describing what is expected in the `CSV` data file.