2014-03-29 14:21 GMT-03:00 Alessandra Campos Alfaro <[email protected]>:

> Tengo una rutina con RAISE NOTICE 'Value of id : %', id; sin embargo me
> gustaria poder tambier indicar el tiempo que lleva hasta ese momento la
> funcion de postgres en ejecucion, sabran Uds como podre llevar a cabo
> aquello?
>

También podés usar clock_timestamp() para medir diferenciales de tiempo
entre queries en una misma función. Ej:

DECLARE
  v_tiempo timestamp with time zone;

BEGIN
  v_tiempo := clock_timestamp();
  RAISE NOTICE 'T Inicio: %', v_tiempo;
  SELECT now() ;
  RAISE NOTICE 'Delta T1: %', clock_timestamp() - v_tiempo;
  SELECT now() ;
  RAISE NOTICE 'Delta T2: %', clock_timestamp() - v_tiempo;
END;

Saludos.

Responder a