Juan Pablo L wrote: > Hi, i want previous updates to rollback ... like nothing happened (a normal > begin/rollback behaviour) Ah, so ereport() is exactly what you want, like Chris Mair said. Assuming you wrote it correctly, you should see the ERROR line in the server logs (set log_message_verbosity=verbose in postgresql.conf to see the full details such as the sqlstate etc). Did you notice you must add an extra ( before errmsg and other sub-calls within the ereport call? -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general