Issues in partitioning - constraint dependency - Mailing list pgsql-hackers

From Itagaki Takahiro
Subject Issues in partitioning - constraint dependency
Date
Msg-id 20091110162233.32D0.52131E4D@oss.ntt.co.jp
Whole thread Raw
Responses Re: Issues in partitioning - constraint dependency  (Peter Eisentraut <peter_e@gmx.net>)
List 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



pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: plpgsql EXECUTE will not set FOUND
Next
From: Peter Eisentraut
Date:
Subject: Re: Issues in partitioning - constraint dependency