You can create a new type based on int2 called uint2. he input function should subtract 32768 and the output function should add 32768. The result should be an int4 so that a number such as 40000 can be displayed. The storage space required would still only be an int2. The actual value stored in the database will be between -32768 to +32767 but the values that will be visible will be 0 to 65535 It seems simple enough to create a type to do that, though I haven't tried. Sim >>You can use a signed type with a CHECK constraint to restrict the >>column's value to positive integers. >The sign doesn't concern me. I am storing a value that is unsigned >and 16 bits wide natively. I'll have to just use an int4 and waste >twice the space I actually need. ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your message can get through to the mailing list cleanly