On Wed, 31 Dec 2003, Tom Lane wrote:
> > Is ABS enough on a 64-bit architecture ?
>
> That was pseudocode, I wasn't actually planning to rely on a function.
> Something more like
>
> longdiff;
FWIW, ISO has a ptrdiff_t, which may be useful here.
Matthew.
> diff = stack_base_ptr
--On Wednesday, December 31, 2003 11:20:49 -0500 Tom Lane
<[EMAIL PROTECTED]> wrote:
Gaetano Mendola <[EMAIL PROTECTED]> writes:
Is ABS enough on a 64-bit architecture ?
That was pseudocode, I wasn't actually planning to rely on a function.
Something more like
long diff;
diff = stack_
Gaetano Mendola <[EMAIL PROTECTED]> writes:
> Is ABS enough on a 64-bit architecture ?
That was pseudocode, I wasn't actually planning to rely on a function.
Something more like
longdiff;
diff = stack_base_ptr - &stack_top_loc;
if (diff < 0)
diff = -di
Tom Lane wrote:
Comments?
Really ugly but effective.
Is ABS enough on a 64-bit architecture ?
Or is better use labs ?
Regards
Gaetano Mendola
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscrib
Mike Mascari <[EMAIL PROTECTED]> writes:
> Would it make sense to also have a nice little global function and/or
> macro available for the author of C-language recursive functions to
> perform a depth test before recursing?
Yeah, I envision presenting this as a nice little macro along the lines
Bruce Momjian wrote:
Sounds like a great approach to me. If it doesn't work, we will find
out during beta testing.
Would it make sense to also have a nice little global function and/or
macro available for the author of C-language recursive functions to
perform a depth test before recursing?
Sounds like a great approach to me. If it doesn't work, we will find
out during beta testing.
---
Tom Lane wrote:
> We've had a couple of complaints in the past about recursive functions
> crashing the server by overflowing
We've had a couple of complaints in the past about recursive functions
crashing the server by overflowing the C execution stack. There is a
GUC variable max_expr_depth that is intended to prevent this sort of
problem for the particular case of overly complex arithmetic
expressions, but it's diffic