Friday, November 12, 2010

Postgres DEBUG

Errors and Messages

RAISE level 'format' [, expression [, ...]];

levels-> DEBUG, LOG, INFO, NOTICE, WARNING, and EXCEPTION(raises an error).

format-> string, % is replaced by the next optional argument's string representation.

usages:
RAISE NOTICE 'Calling cs_create_job(%)', v_job_id;
--This example replace % with v_job_id
RAISE EXCEPTION 'Nonexistent ID --> %', user_id;
--This example will abort the transaction with the given error message:


references:
[1] http://www.postgresql.org/docs/8.1/static/plpgsql-errors-and-messages.html

No comments:

Running apps

Runtastic (I uninstalled because force to update your device - Internet connection problems) Runkeeper  (Currently testing) Runna (Complex,...