mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-10 00:07:00 +02:00
Fix reduce usage with max function.
The (reduce #'max ...) requires an initial value to be provided, as the max function wants at least 1 argument, as we can see here: CL-USER> (handler-case (reduce #'max nil) (condition (e) (format t "~a" e))) Too few arguments in call to #<Compiled-function MAX #x300000113C2F>: 0 arguments provided, at least 1 required.
This commit is contained in:
parent
17a63e18ed
commit
f0d1f4ef8c
@ -49,7 +49,8 @@
|
||||
(let ((max (reduce #'max
|
||||
(mapcar #'length
|
||||
(mapcar #'column-name
|
||||
(table-column-list table))))))
|
||||
(table-column-list table)))
|
||||
:initial-value 0)))
|
||||
(loop
|
||||
:for (col . last?) :on (table-column-list table)
|
||||
:do (progn
|
||||
|
@ -375,7 +375,8 @@
|
||||
|
||||
(defmethod max-indexes-per-table ((catalog catalog) &key)
|
||||
"Count how many indexes maximum per table are listed in SCHEMA."
|
||||
(reduce #'max (mapcar #'max-indexes-per-table (catalog-schema-list catalog))))
|
||||
(reduce #'max (mapcar #'max-indexes-per-table (catalog-schema-list catalog))
|
||||
:initial-value 0))
|
||||
|
||||
;;;
|
||||
;;; Not a generic/method because only used for the table object, and we want
|
||||
|
@ -192,7 +192,8 @@
|
||||
(append (pgstate-tabnames data)
|
||||
(pgstate-tabnames pre)
|
||||
(pgstate-tabnames post)
|
||||
(list legend))))))
|
||||
(list legend))))
|
||||
:initial-value 0))
|
||||
|
||||
(defun report-full-summary (legend sections total-secs)
|
||||
"Report the full story when given three different sections of reporting."
|
||||
|
Loading…
Reference in New Issue
Block a user