Re: Speed dblink using alternate libpq tuple storage
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Marko Kreen <markokr@gmail.com>
Cc: Shigeru Hanada <shigeru.hanada@gmail.com>, Kyotaro HORIGUCHI <horiguchi.kyotaro@oss.ntt.co.jp>, mmoncure@gmail.com, pgsql-hackers@postgresql.org, greg@2ndquadrant.com
Date: 2012-02-07T15:58:10Z
Lists: pgsql-hackers
On Tue, Feb 7, 2012 at 9:44 AM, Marko Kreen <markokr@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