Since "raise exception" in pl/pgSQL will write error message to database log, how can I read database log. If I do "select * from pg_log;", it will show an error message as "pg_log can not be accessed by user". JACK ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly