Unsigned numbers - Mailing list pgsql-sql

From Kaloyan Iliev Iliev
Subject Unsigned numbers
Date
Msg-id 3FC48A26.1090407@faith.digsys.bg
Whole thread Raw
Responses Re: Unsigned numbers  (Richard Huxton <dev@archonet.com>)
List pgsql-sql
Hello Friends,

I have the following questions.
I have a lot of fields in my database that are int or float.
The problem is that I need them to be only positive (unsigned) and the 
users try to insert sometimes negative.
I know that I can make this with CHECK CONSTRAINT but for some reasons 
this is not a good solution for me. The reason is that when I have a 
check constraint on a certain field and someone try to insert negative 
number the error message contains the name of the constraint and the 
name of the table but not the name of the field. So on higher level I 
can't send a proper message to the user.

Are there any unsigned data types like unsigned int or unsigned float.
Can I make a domain or something like that (How exactly to add 
constraint to domain).
I am using v7.3.2.
Thanks!



pgsql-sql by date:

Previous
From: "Kumar"
Date:
Subject: Re: ::text problem
Next
From: Richard Huxton
Date:
Subject: Re: Unsigned numbers