Drop Cascade of Domains

Started by eleinover 22 years ago3 messagesgeneral
Jump to latest
#1elein
elein@varlena.com

I have a table which contains three
columns of domain X.

If I drop the domain X with cascade,
the table remains with no columns.

Is this the proper behaviour?

It seems to me that any action which
results in an invalid object should be
forbidden. On the other hand, with
alter table working well, I am loathe
to argue a table with no columns is
an invalid argument.

Is there a previous rule on this issue?

--elein

============================================================
elein@varlena.com Varlena, LLC www.varlena.com

PostgreSQL Consulting, Support & Training

PostgreSQL General Bits http://www.varlena.com/GeneralBits/
=============================================================
"Free your mind the rest will follow" -- En Vogue

#2Peter Eisentraut
peter_e@gmx.net
In reply to: elein (#1)
Re: Drop Cascade of Domains

elein writes:

It seems to me that any action which
results in an invalid object should be
forbidden. On the other hand, with
alter table working well, I am loathe
to argue a table with no columns is
an invalid argument.

While not allowed according to the SQL standard, we have decided that
tables with zero columns are valid, and the behavior of all commands and
side effects has been aligned with that.

--
Peter Eisentraut peter_e@gmx.net

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: elein (#1)
Re: Drop Cascade of Domains

elein <elein@varlena.com> writes:

I have a table which contains three
columns of domain X.
If I drop the domain X with cascade,
the table remains with no columns.
Is this the proper behaviour?

Yes, we agreed some time ago that that is the best thing to do.

regards, tom lane