Re: Wording in TABLESAMPLE documentation

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, "Patrik VV(dot)" <paddor(at)gmail(dot)com>, pgsql-docs(at)postgresql(dot)org
Subject: Re: Wording in TABLESAMPLE documentation
Date: 2016-08-12 17:50:57
Message-ID: CANP8+jK66dJD4+MZk4M1EW0jrUAUVkqrAWnmZfXUXZaCmr4A7w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On 12 August 2016 at 16:23, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
>> But now you mention it, I agree with you. Let's put it back to say
>> "sample" but also explain where that new sample comes from... my
>> attempt to explain this better is in square brackets
>
>> "If REPEATABLE is not given then a new random sample will be taken for
>> each query [based upon the global seed value for the current user.]"
>
> I think "global" might have implications we don't want. How about
> adding ", based on a system-generated seed"?

What I was trying to express was that

SELECT setseed(dp);
SELECT * FROM foo TABLESAMPLE ...;
SELECT * FROM foo TABLESAMPLE ...;
SELECT * FROM foo TABLESAMPLE ...;

would yield a repeatable set of samples, similarly repeatable but not
same samples as

SELECT * FROM foo TABLESAMPLE ... REPEATABLE;
SELECT * FROM foo TABLESAMPLE ... REPEATABLE;
SELECT * FROM foo TABLESAMPLE ... REPEATABLE;

so that people understand there is some predictability even without REPEATABLE.

So I don't understand the "based on a system-generated seed", but
maybe I'm missing information.

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2016-08-12 17:54:54 Re: Wording in TABLESAMPLE documentation
Previous Message Tom Lane 2016-08-12 15:23:03 Re: Wording in TABLESAMPLE documentation