pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: rob stone <floriparob@tpg.com.au>
To: Wind <guolipengyeah@126.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: tablesample clause doesnt support to be applied to subquery.
Date: Mon, 08 Aug 2022 18:05:51 +1000
Message-ID: <a462479f1c852a8c3af4d4072bd3b219784281d6.camel@tpg.com.au> (raw)
In-Reply-To: <6c33bee6.2d89.1827c70b59a.Coremail.guolipengyeah@126.com>
References: <6c33bee6.2d89.1827c70b59a.Coremail.guolipengyeah@126.com>

Hello,

On Mon, 2022-08-08 at 15:52 +0800, Wind wrote:
> hi~
> I test "tablesample" feature on pg9.5 and found that tablesample
> doesnt support to be applied to subquery.
> for example this sql doesnt work on pg9.5:
> ```
> create table t1(
>     c1 int,
>     c2 int
> );
> select c2 from (select * from t1) as t2 tablesample system (50);
> ```
> while i read sql2003 standard about tablesample and think it should
> allow this usage according to standard.
> is it a deviation to sql standard?


Version 9.5 is not supported. The oldest supported version is 10, the
current version is 14.

Please read chapter 58 in the doco.

HTH,






view thread (2+ messages)

Message-ID: <a462479f1c852a8c3af4d4072bd3b219784281d6.camel@tpg.com.au>
Permalink:  ../a462479f1c852a8c3af4d4072bd3b219784281d6.camel@tpg.com.au/
Also on:    postgresql.org/message-id/a462479f1c852a8c3af4d4072bd3b219784281d6.camel@tpg.com.au

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: floriparob@tpg.com.au, guolipengyeah@126.com
  Subject: Re: tablesample clause doesnt support to be applied to subquery.
  In-Reply-To: <a462479f1c852a8c3af4d4072bd3b219784281d6.camel@tpg.com.au>
  References: <6c33bee6.2d89.1827c70b59a.Coremail.guolipengyeah@126.com> <a462479f1c852a8c3af4d4072bd3b219784281d6.camel@tpg.com.au>

* 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