Thread: About Create Type

About Create Type

From
"jack"
Date:
When I look at CREATE TYPE  on PostgreSql V7.3 Document. What it describes
is beyond what I can understand. My requirement is just I want to define a
type "tyAmt" as "NUMERIC (10,2)" for an application in order to make such
type of columns consistent. Is there any simple way to implement it? Thank
you!

Jack



Re: About Create Type

From
Joe Conway
Date:
jack wrote:
> When I look at CREATE TYPE  on PostgreSql V7.3 Document. What it describes
> is beyond what I can understand. My requirement is just I want to define a
> type "tyAmt" as "NUMERIC (10,2)" for an application in order to make such
> type of columns consistent. Is there any simple way to implement it? Thank
> you!
> 

I think you really want to create a DOMAIN. See:

http://www.us.postgresql.org/users-lounge/docs/7.3/postgres/sql-createdomain.html

HTH,

Joe





Re: About Create Type

From
"jack"
Date:
Thanks Joe. Yes, that is exactly what I need.

Jack