pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Сергей _ <argonaut.od@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Reference-Partitioned Tables
Date: Sat, 7 Nov 2020 05:20:50 -0300
Message-ID: <20201107082050.GA25101@alvherre.pgsql> (raw)
In-Reply-To: <CANJ_Omo0zW04f6ODOBU2_3XG9UyOr2zz0W48kJFy3kCR4YOymA@mail.gmail.com>

On 2020-Nov-06, Сергей _ wrote:

> https://docs.oracle.com/database/121/VLDBG/GUID-00923EB3-05F6-41F7-8437-E42FC9BD9571.htm#VLDBG1093
> 
> There is a widespread model when data related to properties of a superclass
> is stored in a base table, and data related to subclasses in a detail table. Or
> when the main entity has volatile additional parameters. A very simplified
> example in the attached image.

Sounds easier to achieve by using a JSONB column that holds all the
contract details.

> The most successful choice of partitioning table *Contracts* is sectioning
> by list with key column *ContractTypeID*. It would be nice if the table
> *ContractDetails*  is partitioned automatically like the parent table
> *Contracts*. Then we don't have to add a crutch column *ContractTypeID* to
> the table* Contract**Details*   and partition manually in sync with
> *Contracts*. This field also consumes disk space, since the table of details
> is usually large and there can be more than one partitioning key.

Hmm, so you want to partition a table based on values appearing in another
table.  I wouldn't hold my breath waiting for this.





view thread (2+ messages)

Message-ID: <20201107082050.GA25101@alvherre.pgsql>
Permalink:  ../20201107082050.GA25101@alvherre.pgsql/
Also on:    postgresql.org/message-id/20201107082050.GA25101@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: alvherre@alvh.no-ip.org, argonaut.od@gmail.com
  Subject: Re: Reference-Partitioned Tables
  In-Reply-To: <20201107082050.GA25101@alvherre.pgsql>
  References: <CANJ_Omo0zW04f6ODOBU2_3XG9UyOr2zz0W48kJFy3kCR4YOymA@mail.gmail.com> <20201107082050.GA25101@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox