On Tue, Feb 7, 2012 at 9:44 AM, Marko Kreen <mark...@gmail.com> wrote: >> - What is the right (or recommended) way to prevent from throwing >> exceptoin in row-processor callback function? When author should use >> PG_TRY block to catch exception in the callback function? > > When it calls backend functions that can throw exceptions? > As all handlers running in backend will want to convert data > to Datums, that means "always wrap handler code in PG_TRY"?
I would hate to have such a rule. PG_TRY isn't free, and it's prone to subtle bugs, like failing to mark enough stuff in the same function "volatile". -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers