Improve default summary readability.

Now that we have fixed the output of the per-table total timing, we can only
show that timing by default. With more verbosity pgloader will add the extra
columns, and in computer oriented formats (json, csv, copy) all the details
are always provided of course.

See #506.
This commit is contained in:
Dimitri Fontaine 2017-04-30 17:37:21 +02:00
parent 0e12d77a7f
commit 20ea1d78c4
2 changed files with 19 additions and 2 deletions

View File

@ -19,6 +19,16 @@
(defvar *header-format-strings*
'((:human-readable
(:header "~&"
:footer "~%"
:end-of-line-format "~%"
:header-line "~&~v@{~A~:*~} --------- --------- --------- --------------"
:header-tname-format "~&~v@a"
:header-stats-format " ~9@a ~9@a ~9@a ~14@a ~*~*"
:header-cols-format "~&~v@a ~9@a ~9@a ~9@a ~14@a"
:header-cols-names ("table name" "read" "imported" "errors" "total time")))
(:human-readable-verbose
(:header "~&"
:footer "~%"
:end-of-line-format "~%"
@ -191,8 +201,12 @@
(pre (getf sections :pre))
(post (getf sections :post))
(stype (or (parse-summary-type *summary-pathname*)
:human-readable))
(stype (or (parse-summary-type *summary-pathname*)
(if (member *client-min-messages*
'(:notice :sql :info :debug :data))
:human-readable-verbose
:human-readable)))
(*header* (get-format-for stype :header))
(*footer* (get-format-for stype :footer))
(*end-of-line-format* (get-format-for stype :end-of-line-format))

View File

@ -85,6 +85,9 @@
;; maintain the ordering
(push label (pgstate-tabnames pgstate))
(when (typep label 'table)
(pgtable-initialize-reject-files pgtable (table-name label)))
pgtable)))
(defun pgstate-setf (pgstate name &key read rows errs secs rs ws)