Skip site navigation (1) Skip section navigation (2)

Re: plpython crash on exception

From: "Marko Kreen" <markokr(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org>, "Postgres Patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: plpython crash on exception
Date: 2007-11-23 07:28:43
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
On 11/23/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Marko Kreen" <markokr(at)gmail(dot)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.


In response to


pgsql-patches by date

Next:From: Tom LaneDate: 2007-11-23 07:46:36
Subject: Re: plpython crash on exception
Previous:From: Tom LaneDate: 2007-11-23 07:10:53
Subject: Re: plpython crash on exception

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group