From: Wind <guolipengyeah@126.com>
To: pgsql-general@lists.postgresql.org
Subject: tablesample clause doesnt support to be applied to subquery.
Date: Mon, 8 Aug 2022 15:52:17 +0800 (CST)
Message-ID: <6c33bee6.2d89.1827c70b59a.Coremail.guolipengyeah@126.com> (raw)
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?
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: guolipengyeah@126.com
Subject: Re: tablesample clause doesnt support to be applied to subquery.
In-Reply-To: <6c33bee6.2d89.1827c70b59a.Coremail.guolipengyeah@126.com>
References: <6c33bee6.2d89.1827c70b59a.Coremail.guolipengyeah@126.com>
* 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