Re: Numeric 508 datatype

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Fuhr <mike(at)fuhr(dot)org>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Numeric 508 datatype
Date: 2005-12-03 04:25:23
Message-ID: 200512030425.jB34PNR04389@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-patches

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Yep, I am digging through snprintf.c now to try find a solution.
>
> The cleanest solution is probably to fix things so that dopr_outch is
> aware of whether it's working for sprintf or fprintf, and can dump the
> buffer directly to the file when it gets full in the fprintf case.
> Its existing API would need to be changed a bit ... maybe pass it a
> struct containing what it needs, instead of having all the layers of
> code know what to pass.

OK, snprintf.c fixed. I added a 'stream' and outlen parameter to all
the calls, and cleaned up the switch() statement that was outputing
twice. When we were outputing just to a string, it didn't matter, but
now that we are also outputting to a stream, it does.

Passed regression and initdb tests, and factorial(4000) works!

(I could have done the struct but that seemed too invasive.)

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 26.6 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matias Silva 2005-12-03 05:02:08 Re: PostgresSQL Halting System Boot
Previous Message Tom Lane 2005-12-03 03:49:57 Re: was a initdb required from 8.1beta3 -> beta4?

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2005-12-03 06:10:22 Re: Optimizer oddness, possibly compounded in 8.1
Previous Message Joe Conway 2005-12-03 03:33:21 Re: strange behavior (corruption?) of large production

Browse pgsql-patches by date

  From Date Subject
Next Message Qingqing Zhou 2005-12-03 05:22:01 Add function to return the thread safety status of libpq
Previous Message Atsushi Ogawa 2005-12-03 01:42:50 Re: Allow an alias for the target table in UPDATE/DELETE