Re: plpython crash on exception - Mailing list pgsql-patches

From Marko Kreen
Subject Re: plpython crash on exception
Date
Msg-id e51f66da0711222328p359d8db1y6d06a51421cbf265@mail.gmail.com
Whole thread Raw
In response to Re: plpython crash on exception  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: plpython crash on exception
List pgsql-patches
On 11/23/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Marko Kreen" <markokr@gmail.com> writes:
> > Just a note - appendStringInfoVA should take *nprinted argument.
>
> Why?  I can't imagine any real use for it.  If you're thinking that
> it could provide a guide as to what to resize the buffer to, think
> again.

It seems perfectly appropriate:

 If the output was truncated due to this limit then the return
 value is the number of characters (not including the trailing
 '\0') which would have been written to the final string if
 enough space had  been  available.

What problem do you see?

Note that I don't want to fix unnecessary memory usage with that
but several reallocs in case some args are large.

--
marko

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: plpython crash on exception
Next
From: Tom Lane
Date:
Subject: Re: plpython crash on exception