Re: DOMAIN NEED CAST ? - Mailing list pgsql-hackers

From ivan
Subject Re: DOMAIN NEED CAST ?
Date
Msg-id Pine.LNX.4.56.0308182012050.24969@rex.anfa.pl
Whole thread Raw
In response to Re: DOMAIN NEED CAST ?  (Rod Taylor <rbt@rbt.ca>)
List pgsql-hackers

ok, but in this use, but when i need to create datatype,
which i use in other tables (to be sure that always is this same)
i need to always writing casting to convert int to int ?

On Sun, 17 Aug 2003, Rod Taylor wrote:

> On Sun, 2003-08-17 at 14:30, ivan wrote:
> > but in real alias_to_int is equal to int, only with other name;
> > its should be like typedef from c/c++ ?
>
> Not necessarily.
>
> CREATE DOMAIN alias_to_int AS INT CHECK(VALUE BETWEEN 1 AND 4);
>
> The above is very different than plain old integer.
>


pgsql-hackers by date:

Previous
From: ivan
Date:
Subject: numbers format
Next
From: Tom Lane
Date:
Subject: Re: Qualified tables in error messages