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. > ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html