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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Muhammad Usama <m(dot)usama(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, movead(dot)li(at)highgo(dot)ca
Subject: Re: Proposal for syntax to support creation of partition tables when creating parent table
Date: 2019-09-25 15:53:27
Message-ID: 18182.1569426807@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Muhammad Usama <m(dot)usama(at)gmail(dot)com> 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 you create
a bunch of contained objects along with the schema. That variant
is a mess to support and AFAIK it's practically unused in the
real world. (If it were used, we'd get requests to support more
than the small number of object types that the CREATE SCHEMA
grammar currently allows.)

As Fabien noted, there's been some related discussion about this
area, but nobody was advocating a solution of this particular shape.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2019-09-25 16:13:56 Re: PATCH: standby crashed when replay block which truncated in standby but failed to truncate in master node
Previous Message Fabien COELHO 2019-09-25 15:22:19 Re: Proposal for syntax to support creation of partition tables when creating parent table