Question

I am writing a postgresql procedure which calculates the salaries of employees on the basis of their attendance in openbravo. But I am getting wrong values after calculation , Now I just wanted to trace through the procedure , The procedure gets the pinstance id and generates the output, But I just want to check out what is the individual values i am getting in the process, something like we use

system.out.println

in java

please help me.

Était-ce utile?

La solution

You can just call the procedure using the query

select procedure_name (arguments)

for ex: select calculate_salaries(arguments)

At specific places where you want to check values just issue RAISE NOTICE as

RAISE NOTICE '%' ,'value' ||value;

you will get these values in message tab of Pgadmin and you can cross verify your results

Hope that helps

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top