ALTER TABLE ADD CHECK ...

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: ALTER TABLE ADD CHECK ...
Date: 2000-07-09 19:32:11
Message-ID: Pine.BSF.4.10.10007091224250.22671-200000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Here's a beginning to ALTER TABLE ADD CONSTRAINT
for check constraints and some misc fixes (1 of which is
important). It's a fairly minimal beginning that seems
to work on constraints i could put into the table at
create time.

The important fix is that it adds a pg_ownercheck to
the beginning to prevent random people from adding
constraints to tables they don't own. I had thought
that would have been checked earlier, but I missed the
comment on alter table in that piece of code.

It also fixes a stupid little error that causes adding
a foreign key to give the wrong constraint name if one
is specified and the constraint fails on the current data.

Attachment Content-Type Size
atac.patch text/plain 7.7 KB

Browse pgsql-patches by date

  From Date Subject
Next Message Karel Zak 2000-07-10 18:25:25 MemoryContextCheck()
Previous Message David J. MacKenzie 2000-07-07 16:00:02 PostgreSQL virtual hosting support