On Sun, Aug 12, 2018 at 3:08 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Moreover, > at least for the elog/ereport use-case, we'd be buying back some > nontrivial part of that hit by getting rid of expand_fmt_string().
Yeah. I think expand_fmt_string() is pretty costly if you are doing a lot of errors (e.g. write a function that uses an EXCEPTION block to map ERROR -> NULL return and then do SELECT catch_errors(blah) FROM generate_series(1,10000000) g or so. It seems altogether likely to me that getting rid of the need for expand_fmt_string() will make for a net win. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company