From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Constraint stuff |
Date: | 2000-08-07 18:13:08 |
Message-ID: | Pine.BSF.4.10.10008071049530.50954-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, 7 Aug 2000, Tom Lane wrote:
> Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> writes:
> > Tom had suggested storing a more
> > understandable form of the foreign key constraint
> > to make dumping more reasonable in its own table.
> > I'd guess like the src stored for check constraints.
>
> I wasn't actually thinking of storing source, but rather precompiled
> expressions (as I remarked awhile ago, I think pg_relcheck's rcsrc
I guess you could store the fk_constraint node that is generated for fk
constraints, but that's not really an expression... I think I must
be missing something, because I can't quite see what the precompiled
expression for an fk constraint would be...
> However, digging those references out of the expression tree is a little
> bit painful; you're right that we shouldn't expect applications to do
> that for themselves. We could store an additional list of referenced
> items. We wouldn't necessarily have to store that explicitly either,
> though --- functions to say "is this OID referenced in this stored
> expression" or perhaps "give me an array of all function OIDs in this
> expression" would get the job done AFAICS.
The reason I was thinking of storing things was also so you could do
things like: is this oid stored in any constraint. For example,
I'm removing a column, is there any constraint that references this
column, etc, rather than having to code stuff for all of the special
cases in all places that might need it.
From | Date | Subject | |
---|---|---|---|
Next Message | Don Baccus | 2000-08-07 18:29:50 | Re: Re: [GENERAL] Trouble with float4 after upgrading from 6.5.3 to 7.0.2 |
Previous Message | Tom Lane | 2000-08-07 18:07:57 | Re: UNIONS |