cascade and restrict options to alter domain drop constraint

Started by Marc Munroover 18 years ago2 messagesgeneral
Jump to latest
#1Marc Munro
marc@bloodnok.com

I am puzzled by the cascade and restrict options to the alter domain
drop constraint command.

I do not see how a dropping a check constraint should cascade to
anything, or indeed be restricted by anything.

My reasoning is simple: if I drop a check constraint on a domain, no
data should be affected, so no dependant objects should be affected.

Could someone please explain what I am missing?

Thanks in advance

__
Marc

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Marc Munro (#1)
Re: cascade and restrict options to alter domain drop constraint

Marc Munro <marc@bloodnok.com> writes:

I am puzzled by the cascade and restrict options to the alter domain
drop constraint command.

They don't do anything.

I think they were put in because we have this meme that the SQL spec
requires RESTRICT/CASCADE options on every type of DROP, but so far
as I can see, SQL99 has no such option for ALTER DOMAIN DROP CONSTRAINT.
So maybe it's a bug that we take the options for it. Or maybe it's
better to leave them there, in case people are expecting them to
be there on the same reasoning.

regards, tom lane