Re: ADD/DROP INHERITS - Mailing list pgsql-patches

From Tom Lane
Subject Re: ADD/DROP INHERITS
Date
Msg-id 28182.1150384744@sss.pgh.pa.us
Whole thread Raw
In response to Re: ADD/DROP INHERITS  (Greg Stark <gsstark@mit.edu>)
Responses Re: ADD/DROP INHERITS
List pgsql-patches
Greg Stark <gsstark@mit.edu> writes:
> So I'm thinking it's better to leave my implementation as is rather than
> reimplement it using the relcache. Or would it be better to use the relcache
> and then when and if it comes to making inherited tables inherit foreign key
> constraints look into adding foreign keys and the deferrable and isdeffered
> flags to the relcache?

Well, it's reasonable to assume that the relcache entries for check
constraints include everything that's semantically meaningful, because
that's what the actual constraint enforcement code looks at.  IE, if
we ever did have deferrable check constraints then that flag would get
added to the entries.

However, we don't keep any info about FK constraints in the relcache
(except indirectly via their triggers).  At the moment I can't think
of any reason why we should.

If you're happy with the code looking directly at pg_constraint then
I see no reason to change it.  I just mentioned the relcache because
I thought you were concerned about the performance of a pg_constraint
search.

            regards, tom lane

pgsql-patches by date:

Previous
From: Greg Stark
Date:
Subject: Re: ADD/DROP INHERITS
Next
From: Bruce Momjian
Date:
Subject: Re: SQL/XML publishing function experimental patch II