Re: Updating system catalogs after a tuple deletion

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Updating system catalogs after a tuple deletion
Date: 2001-05-15 04:52:43
Message-ID: 3.0.5.32.20010515145243.024097b0@mail.rhyme.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At 23:34 14/05/01 -0400, Tom Lane wrote:
>Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
>> It is worth considering skipping the entire 'copy to children' approach?
>> Something like:
>> pg_constraints(constraint_id, constraint_name, constraint_details....)
>> pg_relation_constraints(rel_id, constraint_id)
>> Then, when we drop constraint 'FRED', the relevant rows of these tables are
>> deleted. There is only ever one copy of the constraint definition.
...
>
>A small advantage of doing it this way is that it'd be easier to detect
>the case where the same constraint is multiply inherited from more than
>one parent, as in
>

Other advantages include:

- easy ALTER TABLE ALTER CONSTRAINT (does it exist?)
- cleaner pg_dump code
- possibility to have NULL names for system objects which avoids any
namespace corruption.

It's probably worth adding extra information to the pg_constraints table to
include inform,ation about how it was created (pk, fk, user-defined etc).

----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 0500 83 82 82 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephan Szabo 2001-05-15 04:55:31 Re: Updating system catalogs after a tuple deletion
Previous Message Bruce Momjian 2001-05-15 04:45:08 Re: Re: bug in pgcrypto 0.3