I have a stored procedure where, at the conclusion of execution, I must display the elapsed time. To accomplish this, I have created two variables named start_process and end_process. However, upon completion of execution, the value returned by these variables is identical. This issue arose after our upgrade to Vertica 23.3.0-2; such behavior was not observed in version 11.1.
Has anything changed, or am I overlooking something?
DO $$
DECLARE
start_process timestamp;
end_process timestamp;
y timestamp;
BEGIN
start_process := select now();
raise info 'start_process: %', start_process;
perform SELECT SLEEP(10);
end_process := select now();
raise info 'end_process: %', end_process;
END;
$$
[2024-02-19 18:20:32] [V0002][2005] start_process: 2024-02-19 18:20:22.162039
[2024-02-19 18:20:32] [V0002][2005] end_process: 2024-02-19 18:20:22.162039