From 72e7c2af7024df89e743405232e8aaca9b6e2a19 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Tue, 8 Dec 2015 21:27:33 +0100 Subject: [PATCH] At long last, log cast rule choices, see #317. To help debug the casting rule choices, output a line for each decision that is made with the input and the output of the decision. --- src/sources/common/casting-rules.lisp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sources/common/casting-rules.lisp b/src/sources/common/casting-rules.lisp index 73c0be3..6b65315 100644 --- a/src/sources/common/casting-rules.lisp +++ b/src/sources/common/casting-rules.lisp @@ -158,6 +158,11 @@ (setf first-match-using using)) until target finally + (log-message :info "CAST ~a.~a ~a [~s, ~:[NULL~;NOT NULL~]~:[~*~;, ~a~]] TO ~s" + table-name column-name ctype default + (string= "NO" nullable) + (string/= "" extra) extra + (format-pgsql-type source target using)) (return (list :transform-fn (or first-match-using using) :pgtype (format-pgsql-type source target using)))))))