> The function is to execute updates on each ID assigning the value, but if > one of these operation fails (does not meet certain criteria) > inside the function i would like to rollback and leave everything > untouched, in case other ID;s were already updated previously, > and come back to the caller and infor Hi, I think you want ereport(), here is an example: http://www.postgresql.org/docs/9.3/static/xfunc-c.html Bye, Chris. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general