Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bYGfe-0004Jg-BG for pgsql-docs@arkaria.postgresql.org; Fri, 12 Aug 2016 17:55:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bYGfd-0000Hv-UV for pgsql-docs@arkaria.postgresql.org; Fri, 12 Aug 2016 17:55:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bYGfc-0000F6-Ly for pgsql-docs@postgresql.org; Fri, 12 Aug 2016 17:55:00 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bYGfZ-0000bk-TT for pgsql-docs@postgresql.org; Fri, 12 Aug 2016 17:55:00 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u7CHss0p007640; Fri, 12 Aug 2016 13:54:54 -0400 From: Tom Lane To: Simon Riggs cc: "Patrik VV." , pgsql-docs@postgresql.org Subject: Re: Wording in TABLESAMPLE documentation In-reply-to: References: <20160811162148.26427.26037@wrigleys.postgresql.org> <26367.1471011853@sss.pgh.pa.us> <29052.1471015383@sss.pgh.pa.us> Comments: In-reply-to Simon Riggs message dated "Fri, 12 Aug 2016 18:50:57 +0100" Date: Fri, 12 Aug 2016 13:54:54 -0400 Message-ID: <7639.1471024494@sss.pgh.pa.us> X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org Simon Riggs writes: > On 12 August 2016 at 16:23, Tom Lane 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