From: | Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Type modifiers for DOMAIN |
Date: | 2010-01-06 06:12:13 |
Message-ID: | 20100106151213.96F9.52131E4D@oss.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
I'm trying to use DOMAIN as just synonym types for database migration.
For example,
=# CREATE DOMAIN varchar2 AS pg_catalog.varchar;
=# CREATE DOMAIN number AS pg_catalog.numeric;
Domains were created successfully, but I cannot use type modifiers for them.
=# CREATE TABLE tbl (v varchar2(10));
ERROR: type modifier is not allowed for type "varchar2"
What reason do we have not to inherit typmodin/typmodout from the base type?
I found a comment in DefineDomain(),
/* Domains never accept typmods, so no typmodin/typmodout needed */
but can we relax the restriction? This feature would be useful for migration
from other DBMSes that have non-standard data types.
Regards,
---
Takahiro Itagaki
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Jaime Casanova | 2010-01-06 06:33:03 | Re: Type modifiers for DOMAIN |
Previous Message | Takahiro Itagaki | 2010-01-06 05:41:59 | Re: New VACUUM FULL |