From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: appendPQExpBufferVA vs appendStringInfoVA |
Date: | 2013-11-02 01:27:53 |
Message-ID: | 23173.1383355673@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> Tom commited some changes to appendStringInfoVA a few weeks ago which
> allows it to return the required buffer size if the current buffer is not
> big enough.
> On looking at appendPQExpBufferVA I'm thinking it would be nice if it could
> make use of the new pvsnprintf function to bring the same potential
> performance improvement in to there too.
Uh ... it does contain pretty much the same algorithm now. We can't
simply use pvsnprintf there because exit-on-error is no good for
libpq's purposes, so unless we want to rethink that, a certain
amount of code duplication is unavoidable. But they both understand
about C99 vsnprintf semantics now.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2013-11-02 01:47:51 | Re: appendPQExpBufferVA vs appendStringInfoVA |
Previous Message | David Rowley | 2013-11-02 01:02:12 | appendPQExpBufferVA vs appendStringInfoVA |