From: | Rod Taylor <rbt(at)zort(dot)ca> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Subject: | Dependency / Constraint patch |
Date: | 2002-06-15 19:10:10 |
Message-ID: | 3D0B9112.6010201@zort.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Differences from previous version:
- Fully functional ALTER TABLE / DROP CONSTRAINT
- pg_dump uses ALTER TABLE / ADD FOREIGN KEY
- psql displays foreign keys (\d output)
- Foreign key triggers are autonamed based on the constraint name
- Namespace dependencies were quickly added. Unable to test them very
well (DROP SCHEMA required)
Postgresql TODO items completed (or very close):
# Add ALTER TABLE DROP non-CHECK CONSTRAINT
# Allow psql \d to show foreign keys
* Add pg_depend table for dependency recording; use sysrelid, oid,
depend_sysrelid, depend_oid, name
# Auto-destroy sequence on DROP of table with SERIAL
# Prevent column dropping if column is used by foreign key
# Automatically drop constraints/functions when object is dropped
# Make constraints clearer in dump file
# Make foreign keys easier to identify
The locking of relations may not be as strong as it should be. I was
unable to cause failure -- and can't see what it would be missing but it
has been bothering me.
I've not touched pg_dump for SERIAL stuff. I may do it later.
Basic documentation updates included. I'll scour for examples or notes
which may no longer apply in a couple of weeks.
Attached files:
TODO.depend - A short list of items I completed, notes, any assumptions,
and possible outstanding items
src/backend/catalog/pg_constraint.c
src/backend/catalog/pg_depend.c
src/include/catalog/pg_constraint.h
src/include/catalog/pg_depend.h
src/test/regress/expected/drop.out
Remove:
src/backend/catalog/pg_relcheck.c
src/include/catalog/pg_relcheck.h
Attachment | Content-Type | Size |
---|---|---|
TODO.depend | text/plain | 3.5 KB |
pg_constraint.c | text/plain | 17.4 KB |
pg_depend.c | text/plain | 19.2 KB |
pg_constraint.h | text/plain | 3.8 KB |
pg_depend.h | text/plain | 2.8 KB |
drop.out | text/plain | 5.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Rod Taylor | 2002-06-15 19:13:25 | Re: Dependency / Constraint patch |
Previous Message | Bruce Momjian | 2002-06-15 18:49:52 | Re: libpq++ fixes |