tablesample with partitioned tables

Amit Langote <langote_amit_f8@lab.ntt.co.jp>

From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2017-02-22T07:51:46Z
Lists: pgsql-hackers

Attachments

Attached patch fixes an oversight that tablesample cannot be used with
partitioned tables:

create table p (a int) partition by list (a);
select * from p tablesample bernoulli (50);
ERROR:  TABLESAMPLE clause can only be applied to tables and materialized
views

Thanks,
Amit

Commits

  1. Make tablesample work with partitioned tables.