pg.ddx.io  pgsql-patches@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: NikhilS <nikkhils@gmail.com>
To: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Auto Partitioning Patch - WIP version 1
Date: Tue, 3 Apr 2007 21:06:10 +0530
Message-ID: <d3c4af540704030836o242c49cl2688ab4ec9808ac3@mail.gmail.com> (raw)
In-Reply-To: <d3c4af540703292358s8ed731el7771ab14083aa610@mail.gmail.com>
References: <d3c4af540703292358s8ed731el7771ab14083aa610@mail.gmail.com>

Hi,

>
> The following things are TODOs:
>
> iv) Auto generate rules using the checks mentioned for the partitions, to
> handle INSERTs/DELETEs/UPDATEs to navigate them to the appropriate child.
> Note that checks specified directly on the master table will get inherited
> automatically.


Am planning to do the above by using the check constraint specified for each
partition. This constraint's raw_expr field ends up becoming the whereClause
for the rule specific to that partition.

One question is whether we should we allow auto creation of UPDATE rules
given that updates can end up spanning multiple partitions if the column on
which partitioning is specified gets updated?

Also if we decide to auto - add rules for UPDATE, the raw_expr will need to
be modified to refer to "OLD."col, which can be quite a headache. We do not
have parsetree walker/mutator functions as far as I could see in the code.

Regards,
Nikhils

-- 
EnterpriseDB               http://www.enterprisedb.com

view thread (59+ messages)  latest in thread

Message-ID: <d3c4af540704030836o242c49cl2688ab4ec9808ac3@mail.gmail.com>
Permalink:  ../d3c4af540704030836o242c49cl2688ab4ec9808ac3@mail.gmail.com/
Also on:    postgresql.org/message-id/d3c4af540704030836o242c49cl2688ab4ec9808ac3@mail.gmail.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-patches@postgresql.org
  Cc: nikkhils@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: Auto Partitioning Patch - WIP version 1
  In-Reply-To: <d3c4af540704030836o242c49cl2688ab4ec9808ac3@mail.gmail.com>

* 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