On Mon, Mar 15, 2010 at 11:37 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: > If we make the implementation be such that "(rec->field)::foo" forces a runtime cast to foo (rather than throwing an error if it's not type foo already)
yeah...explicit cast should always do 'best effort' > The cost of looking up the ever-changing cast function could still be > unpleasant, although I think we could hide it in the executor expression > node instead of forcing a whole new parse/plan cycle each time. right. if you do that, it's still going to be faster than the dyna-sql/information schema/perl hacks people are doing right now (assuming they didn't give up and code it in the app). This is rtti for plpgsql, and functions that use it are going have to be understood as being slower and to be avoided if possible, like exception handlers. IMNSHO, this is a small price to pay. merlin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers