Search Postgresql Archives

[GRNERAL] drop domain xx cascade

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,

I test it as follow:
--------------------
TEST=# select version();
                           version
-------------------------------------------------------------
 PostgreSQL 8.4.1, compiled by Visual C++ build 1400, 32-bit
(1 row)

TEST=# CREATE DOMAIN MY_DOMAIN AS DECIMAL (5, 2);
CREATE DOMAIN
TEST=# CREATE TABLE TT(tt_c MY_DOMAIN);
CREATE TABLE
TEST=# \d TT
       Table "public.tt"
 Column |   Type    | Modifiers
--------+-----------+-----------
 tt_c   | my_domain |


TEST=# CREATE VIEW V_TT AS SELECT * FROM TT;
CREATE VIEW
TEST=# \d V_TT
       View "public.v_tt"
 Column |   Type    | Modifiers
--------+-----------+-----------
 tt_c   | my_domain |
View definition:
 SELECT tt.tt_c
   FROM tt;


TEST=# DROP DOMAIN MY_DOMAIN CASCADE;
NOTICE:  drop cascades to 3 other objects
DETAIL:  drop cascades to table tt column tt_c
drop cascades to view v_tt
drop cascades to view v_tt column tt_c
DROP DOMAIN
TEST=# \d TT
     Table "public.tt"
 Column | Type | Modifiers
--------+------+-----------

-----------------------------------------------------------------

But, SQL standard(sql92 or sql2008) said:
---------------
Let C be any column descriptor that includes DN, let T be the table 
described by the table descriptor that includes C, and let TN be the table 
name of T. C is modified as follows:
a) DN is removed from C. A copy of the data type descriptor of D is included 
in C.
b) If C does not include a <default clause> and the domain descriptor of D 
includes a <default clause>,then a copy of the <default clause> of D is 
included in C.

My question is: When run "DROP DOMAIN MY_DOMAIN CASCADE", if Whether 
postgresql will permit from the SQL standard ?

So, I expect the result is (after drop domain):
---------------------------------
TEST=# \d TT
         Table "public.TT"
 Column |     Type     | Modifiers
--------+--------------+-----------
 tt_c   | numeric(5,2) |



Any help is appreciated!
Hx.li





-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux