All,
I’m currently on Toad 12.11.0.82.
Within an IF statement, I’m doing two calls to a single routine (parms are different).
Strange enough, the code gets formatted quite differently:
if lower(p_debug) = ‘debug’
then
utl_krg.msg_log.log_debug_msg(p_schema => g_my_schema
, p_package => g_my_package
, p_routine => l_my_routine
, p_msg_id => g_my_msg_prefix || ‘0022D’
, p_message => 'Queue ’
|| coalesce(g_mqget_queue, ‘<*Null>’)
|| ’ opened ’
|| case
when l_errmsg = ‘OK’ then ‘successfully’
else ’ with error: ’ || l_errmsg
end
);
utl_krg.msg_log.log_debug_msg(
p_schema =>
g_my_schema
, p_package =>
g_my_package
, p_routine =>
l_my_routine
, p_msg_id =>
g_my_msg_prefix || ‘0023D’
, p_message =>
‘g_mqget_status=’
|| coalesce(g_mqget_status, ‘<*Null>’)
|| ‘, g_mqget_retry_time=’
|| coalesce(trim(to_char(g_mqget_retry_time, ‘yyyy-mm-dd hh24:mi:ss’)), ‘<*Null>’)
);
end if;
Q1: Why are they being formatted differently?
Q2: I don’t mind the reduced indentation of the p_message parameter, but I really hate all the other parameters being spread out over two lines where there is no need to do so. Would it be possible to make this configurable?
Sorry if it sounds a bit complex, but you asked why, and that’s just the way it works.