Im trying to debug Netezza procedure using RAISE NOTICE after UPDATE AND INSERT queries. Im trying to show the current time after each query is finished. I tried something like this:
RAISE NOTICE 'UPDATE time=%', now();
But that doesn't work. Only way I have had it working is to define a timestamp variable at the beginning of procedure and then just before raising notice I define this variablie like this:
timevar:=now();
RAISE NOTICE 'UPDATE time=%', timevar;
Is there a way where I can combine it just in one line and not have to define a new variable at beginning of procedure and assining it now() each time I whant to RAISE NOTICE ?
RAISE only accepts identifiers as arguments after the format expression. The way you are currently doing it is really the only way.
The statement syntax follows:
RAISE level ’format’ [, identifier [...]];