Re: tablesample clause doesnt support to be applied to subquery.

From: rob stone <floriparob(at)tpg(dot)com(dot)au>
To: Wind <guolipengyeah(at)126(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: tablesample clause doesnt support to be applied to subquery.
Date: 2022-08-08 08:05:51
Message-ID: a462479f1c852a8c3af4d4072bd3b219784281d6.camel@tpg.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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,

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Techsupport 2022-08-08 09:29:44 RE: 20220722-pg_dump: error: invalid number of parents 0 for table
Previous Message Wind 2022-08-08 07:52:17 tablesample clause doesnt support to be applied to subquery.