pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Patrik VV. <paddor@gmail.com>
Cc: pgsql-docs@postgresql.org
Subject: Re: Wording in TABLESAMPLE documentation
Date: Fri, 12 Aug 2016 13:54:54 -0400
Message-ID: <7639.1471024494@sss.pgh.pa.us> (raw)
In-Reply-To: <CANP8+jK66dJD4+MZk4M1EW0jrUAUVkqrAWnmZfXUXZaCmr4A7w@mail.gmail.com>
References: <20160811162148.26427.26037@wrigleys.postgresql.org>
	<CANP8+jJijc-rUNA_YuQOarFXUmHH8Qj5GuNuMMKK1MusNPepaQ@mail.gmail.com>
	<26367.1471011853@sss.pgh.pa.us>
	<CANP8+jJUzOsbc6P39+mGr-0KRqpmuEmwSA6jvyRKyZovUP9hMA@mail.gmail.com>
	<29052.1471015383@sss.pgh.pa.us>
	<CANP8+jK66dJD4+MZk4M1EW0jrUAUVkqrAWnmZfXUXZaCmr4A7w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>

Simon Riggs <simon@2ndquadrant.com> writes:
> On 12 August 2016 at 16:23, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> 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;

But that's *wrong*.  Not all tablesample methods make any such guarantee.
In fact, neither of our contrib methods do.  Only if you use REPEATABLE
(and the method allows it) is there any promise at all about repeatability.

			regards, tom lane


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs



view thread (8+ messages)  latest in thread

Message-ID: <7639.1471024494@sss.pgh.pa.us>
Permalink:  ../7639.1471024494@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7639.1471024494@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, simon@2ndquadrant.com, paddor@gmail.com
  Subject: Re: Wording in TABLESAMPLE documentation
  In-Reply-To: <7639.1471024494@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox