Re: Proposal for syntax to support creation of partition tables when creating parent table

2019-09-26 Thread Amit Langote
Hi Ahsan, Usama Thanks for starting work on this. On Thu, Sep 26, 2019 at 3:46 AM Ahsan Hadi wrote: > On Wed, Sep 25, 2019 at 8:53 PM Tom Lane wrote: >> As Fabien noted, there's been some related discussion about this >> area, but nobody was advocating a solution of this particular shape. > > T

Re: Proposal for syntax to support creation of partition tables when creating parent table

2019-09-25 Thread Ahsan Hadi
On Wed, Sep 25, 2019 at 8:53 PM Tom Lane wrote: > Muhammad Usama writes: > > I want to propose an extension to CREATE TABLE syntax to allow the > creation > > of partition tables along with its parent table using a single statement. > > TBH, I think this isn't a particularly good idea. It seems

Re: Proposal for syntax to support creation of partition tables when creating parent table

2019-09-25 Thread Tom Lane
Muhammad Usama writes: > I want to propose an extension to CREATE TABLE syntax to allow the creation > of partition tables along with its parent table using a single statement. TBH, I think this isn't a particularly good idea. It seems very reminiscent of the variant of CREATE SCHEMA that lets y

Re: Proposal for syntax to support creation of partition tables when creating parent table

2019-09-25 Thread Fabien COELHO
Hello Muhammad, I think that it may be better to have a partition spec which describes not the list of partitions, but what is wanted, letting postgres to do some more work. See this thread: https://www.postgresql.org/message-id/alpine.DEB.2.21.1907150711080.22273@lancre I want to propos

Proposal for syntax to support creation of partition tables when creating parent table

2019-09-25 Thread Muhammad Usama
Hi Hackers, I want to propose an extension to CREATE TABLE syntax to allow the creation of partition tables along with its parent table using a single statement. In this proposal, I am proposing to specify the list of partitioned tables after the PARTITION BY clause. CREATE TABLE table_name (..)