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.
This commit is contained in:
Dimitri Fontaine 2015-12-08 21:27:33 +01:00
parent 735cdc8fdc
commit 72e7c2af70

View File

@ -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)))))))