From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: tablesample with partitioned tables |
Date: | 2017-02-22 15:54:04 |
Message-ID: | 20170222155404.GA18866@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Feb 22, 2017 at 04:51:46PM +0900, Amit Langote wrote:
> 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!
Should the error message change somehow to reflect that partitioned
tables are included? Is complete transparency of partitioned tables
the goal, and reasonable in this context?
Also, is there a good reason apart from tuits not to expand
TABLESAMPLE to the rest of our SQL-visible relation structures? I'm
guessing this could have something to do with the volatility they
might have, whether in views that call volatile functions or in
foreign tables that might not make the right guarantees...
Best,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2017-02-22 15:59:03 | Re: Allow pg_dumpall to work without pg_authid |
Previous Message | Tom Lane | 2017-02-22 15:45:00 | Re: Replication vs. float timestamps is a disaster |