> > Would we be happy with the following, which would work ?
> > } while (z <= 0 || z == MAX_RANDOM_VALUE);
>
> I suppose this doesn't?
> } while (z <= 0 || z >= MAX_RANDOM_VALUE);
Ah, yes ! That also works and is a lot nicer. Can you please apply ?
Together with the patch in
Neil Conway <[EMAIL PROTECTED]> writes:
> This patch fixes a small memory leak in libpq: the 'pstatus' field of
> PGconn is a linked list of malloc'ed nodes, so it should be freed on
> PQfinish().
Arghh! Can't believe I forgot to do that. Patch applied --- many thanks.
r
"Zeugswetter Andreas SB SD" <[EMAIL PROTECTED]> writes:
> Would we be happy with the following, which would work ?
> } while (z <= 0 || z == MAX_RANDOM_VALUE);
I suppose this doesn't?
} while (z <= 0 || z >= MAX_RANDOM_VALUE);
regards, tom lane
-
This patch reduces some unsightly #ifdefs, and fixes two typos in
comments in the psql code. This doesn't make any functional change, so
feel free to save it for 7.5
-Neil
Index: src/bin/psql/command.c
===
RCS file: /var/lib/cvs/pgsq
> ! } while (!(z > 0 && z < MAX_RANDOM_VALUE));
>
> ! } while (z == 0 || z == MAX_RANDOM_VALUE);
>
> This seems fairly ugly, since it eliminates the original coding's
> positive guarantee that the final result is in 0 < x < 1. Does your
yes, ugly :-(
> compiler manage not to choke if
This patch fixes a small memory leak in libpq: the 'pstatus' field of
PGconn is a linked list of malloc'ed nodes, so it should be freed on
PQfinish().
-Neil
Index: src/interfaces/libpq/fe-connect.c
===
RCS file: /var/lib/cvs/pgsql-se
On Fri, 2003-10-10 at 05:56, Manfred Koizar wrote:
> On Tue, 30 Sep 2003 20:00:22 -0400, Neil Conway <[EMAIL PROTECTED]>
> wrote:
> >This patch adds a new GUC var, "default_use_oids"
>
> Shouldn't it be honoured by CREATE TABLE AS SELECT ... ?
Good catch. I've attached an updated patch. I also in
Tom Lane wrote:
"Zeugswetter Andreas SB SD" <[EMAIL PROTECTED]> writes:
! } while (!(z > 0 && z < MAX_RANDOM_VALUE));
! } while (z == 0 || z == MAX_RANDOM_VALUE);
This seems fairly ugly, since it eliminates the original coding's
positive guarantee that the final result is in 0 < x < 1. Does
"Zeugswetter Andreas SB SD" <[EMAIL PROTECTED]> writes:
! } while (!(z > 0 && z < MAX_RANDOM_VALUE));
! } while (z == 0 || z == MAX_RANDOM_VALUE);
This seems fairly ugly, since it eliminates the original coding's
positive guarantee that the final result is in 0 < x < 1. Does your
co
Hi Peter,
While fighting with a compiler bug here, I came across the following code,
that loops here (on AIX 4.3.2) due to a compiler bug,
presumably with the z < MAX_RANDOM_VALUE (it even warns at compile time):
static double
random_fract(void)
{
longz;
/* random()
Bruce Momjian wrote:
Gaetano Mendola wrote:
Bruce Momjian wrote:
Thanks.
I have applied this to the SGML docs. The HISTORY file will be updated
automatically now.
I didn't see in the notes about the "Migration to
version 7.4" the fact that now inside a plpgsql
function is not anymore accepted
11 matches
Mail list logo