Re: DOMAIN NEED CAST ?

From: ivan <iv(at)psycho(dot)pl>
To: Rod Taylor <rbt(at)rbt(dot)ca>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: DOMAIN NEED CAST ?
Date: 2003-08-18 18:14:27
Message-ID: Pine.LNX.4.56.0308182012050.24969@rex.anfa.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message ivan 2003-08-18 18:18:39 numbers format
Previous Message Ed L. 2003-08-18 17:17:20 Re: dbmirror revisions