Re: [HACKERS] appendStringInfo vs appendStringInfoString

2013-10-31 Thread Alvaro Herrera
Robert Haas escribió: > So, does that mean we're good to go? Looks fine to me ... -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to yo

Re: [HACKERS] appendStringInfo vs appendStringInfoString

2013-10-30 Thread Robert Haas
On Wed, Oct 30, 2013 at 12:12 PM, Alvaro Herrera wrote: > Andres Freund escribió: >> On 2013-10-30 10:52:05 -0300, Alvaro Herrera wrote: >> > Robert Haas escribió: >> > > On Wed, Oct 30, 2013 at 4:51 AM, David Rowley >> > > wrote: >> > > > I've attached a re-based version of this. >> > > >> > >

Re: [HACKERS] appendStringInfo vs appendStringInfoString

2013-10-30 Thread Alvaro Herrera
Andres Freund escribió: > On 2013-10-30 10:52:05 -0300, Alvaro Herrera wrote: > > Robert Haas escribió: > > > On Wed, Oct 30, 2013 at 4:51 AM, David Rowley > > > wrote: > > > > I've attached a re-based version of this. > > > > > > I don't see any compelling reason not to commit this. Does anyon

Re: [HACKERS] appendStringInfo vs appendStringInfoString

2013-10-30 Thread Andres Freund
On 2013-10-30 10:52:05 -0300, Alvaro Herrera wrote: > Robert Haas escribió: > > On Wed, Oct 30, 2013 at 4:51 AM, David Rowley wrote: > > > I've attached a re-based version of this. > > > > I don't see any compelling reason not to commit this. Does anyone > > wish to object? > > I think a blanke

Re: [HACKERS] appendStringInfo vs appendStringInfoString

2013-10-30 Thread Alvaro Herrera
Robert Haas escribió: > On Wed, Oct 30, 2013 at 4:51 AM, David Rowley wrote: > > I've attached a re-based version of this. > > I don't see any compelling reason not to commit this. Does anyone > wish to object? I think a blanket substitution of places that currently have %s might cause bugs, pa

Re: [HACKERS] appendStringInfo vs appendStringInfoString

2013-10-30 Thread Robert Haas
On Wed, Oct 30, 2013 at 4:51 AM, David Rowley wrote: > I've attached a re-based version of this. I don't see any compelling reason not to commit this. Does anyone wish to object? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hac

Re: [HACKERS] appendStringInfo vs appendStringInfoString

2013-10-30 Thread David Rowley
On Mon, Sep 30, 2013 at 10:10 PM, David Rowley wrote: > On Sat, Sep 28, 2013 at 9:44 PM, David Rowley wrote: > >> I did some benchmarking earlier in the week for the new patch which was >> just commited to allow formatting in the log_line_prefix string. In version >> 0.4 of the patch there was so

Re: [HACKERS] appendStringInfo vs appendStringInfoString

2013-09-30 Thread David Rowley
On Sat, Sep 28, 2013 at 9:44 PM, David Rowley wrote: > I did some benchmarking earlier in the week for the new patch which was > just commited to allow formatting in the log_line_prefix string. In version > 0.4 of the patch there was some performance regression as I was doing > appendStringInfo(b

Re: [HACKERS] appendStringInfo vs appendStringInfoString

2013-09-29 Thread Peter Eisentraut
On Sat, 2013-09-28 at 21:50 +1200, David Rowley wrote: > Also on making the changes I noticed a possible small bug in the code > that could cause a crash if for some reason a translation contained a > %s. I know it is an unlikely scenario, never-the-less here is a patch > to fix it. There are mech

Re: [HACKERS] appendStringInfo vs appendStringInfoString

2013-09-29 Thread David Rowley
On Sat, Sep 28, 2013 at 11:11 PM, Heikki Linnakangas < hlinnakan...@vmware.com> wrote: > On 28.09.2013 12:44, David Rowley wrote: > >> The macro for test 4 was as follows: >> #define appendStringInfoStringConst(**buf, s) appendBinaryStringInfo(buf, >> (s), sizeof(s)-1) >> > > If that makes any dif

Re: [HACKERS] appendStringInfo vs appendStringInfoString

2013-09-28 Thread Andres Freund
On 2013-09-28 14:11:29 +0300, Heikki Linnakangas wrote: > On 28.09.2013 12:44, David Rowley wrote: > >The macro for test 4 was as follows: > >#define appendStringInfoStringConst(buf, s) appendBinaryStringInfo(buf, > >(s), sizeof(s)-1) > > If that makes any difference in practice, I wonder if we sh

Re: [HACKERS] appendStringInfo vs appendStringInfoString

2013-09-28 Thread David Rowley
On Sat, Sep 28, 2013 at 11:11 PM, Heikki Linnakangas < hlinnakan...@vmware.com> wrote: > On 28.09.2013 12:44, David Rowley wrote: > >> The macro for test 4 was as follows: >> #define appendStringInfoStringConst(**buf, s) appendBinaryStringInfo(buf, >> (s), sizeof(s)-1) >> > > If that makes any dif

Re: [HACKERS] appendStringInfo vs appendStringInfoString

2013-09-28 Thread Heikki Linnakangas
On 28.09.2013 12:44, David Rowley wrote: The macro for test 4 was as follows: #define appendStringInfoStringConst(buf, s) appendBinaryStringInfo(buf, (s), sizeof(s)-1) If that makes any difference in practice, I wonder if we should just do: #define appendStringInfoString(buf, s) appendBinarySt

Re: [HACKERS] appendStringInfo vs appendStringInfoString

2013-09-28 Thread David Rowley
On Sat, Sep 28, 2013 at 9:44 PM, David Rowley wrote: > I did some benchmarking earlier in the week for the new patch which was > just commited to allow formatting in the log_line_prefix string. In version > 0.4 of the patch there was some performance regression as I was doing > appendStringInfo(b

[HACKERS] appendStringInfo vs appendStringInfoString

2013-09-28 Thread David Rowley
I did some benchmarking earlier in the week for the new patch which was just commited to allow formatting in the log_line_prefix string. In version 0.4 of the patch there was some performance regression as I was doing appendStringInfo(buf, "%*s", padding, variable); instead of appendStringInfoStrin