Issues in partitioning - constraint dependency

From: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Issues in partitioning - constraint dependency
Date: 2009-11-10 07:22:33
Message-ID: 20091110162233.32D0.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'm working on partitioning syntax, amd encountered a dependency issue.
When we define partition, also create an implicit CHECK constraint.
The constraint should be kept until the pg_inherits entry is removed.
But we cannot have a dependency from the constraint to the inheritance.

An idea is adding pg_inherits support into the common dependency module,
but it didn't work as far as I tested. The code will be cleaner if we can
do so, but we don't now. Are there known issues here?

Another idea is storing the constraint as an independent constraint
in pg_inherits. When we cache a relation, merge CHECK constraints in
pg_constraint and pg_inherits. It could solve the issue, but we will
have duplicated codes.

The third idea is just saying "Don't do that" in the documentation...

What should we do for it?

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2009-11-10 07:50:24 Re: Issues in partitioning - constraint dependency
Previous Message David Fetter 2009-11-10 06:58:27 Re: plpgsql EXECUTE will not set FOUND