Re: setseed accepts bad seeds - Mailing list pgsql-bugs

From Tom Lane
Subject Re: setseed accepts bad seeds
Date
Msg-id 28577.1205122505@sss.pgh.pa.us
Whole thread Raw
In response to Re: setseed accepts bad seeds  (Kris Jurka <books@ejurka.com>)
Responses Re: setseed accepts bad seeds
List pgsql-bugs
Kris Jurka <books@ejurka.com> writes:
> On Wed, 11 Apr 2007, Tom Lane wrote:
>> It's not really possible to use it "incorrectly", AFAICS.  Any value you
>> might pass to it will result in a specific new seed value.  Nowhere is
>> there any guarantee of what the mapping is, and it's obviously
>> impossible to guarantee that the mapping is one-to-one, so any user
>> assumptions about what a specific seed value might "mean" seem broken
>> regardless.

> Then please consider this patch which checks the range and maps the
> provided value to the entire seed space.

I'm still not very happy about this.  It'll change the behavior of
existing applications, in the service of no goal that I consider
convincing.

I'd be inclined to leave the mapping alone and just insert a warning
(or hard error) for inputs outside the range -1 to 1.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Yann ROBIN"
Date:
Subject: Re: BUG #4021: UUID NULL and not equal query failed
Next
From: Kris Jurka
Date:
Subject: Re: setseed accepts bad seeds