Re: single byte unsigned integer datatype - Mailing list pgsql-sql

From Peter Eisentraut
Subject Re: single byte unsigned integer datatype
Date
Msg-id Pine.LNX.4.30.0101141648030.977-100000@peter.localdomain
Whole thread Raw
In response to single byte unsigned integer datatype  ("Joe Conway" <jconway2@home.com>)
List pgsql-sql
Joe Conway writes:

> I was looking for a datatype to represent a single byte unsigned integer.
> The closest thing I can find looking through the online manual is a one byte
> char. Are there any side-effects of using a char datatype for this purpose?

Yes, it won't store single byte unsigned integers, only single byte signed
characters.

> Is there a better datatype to use?

smallint with a check constraint

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



pgsql-sql by date:

Previous
From: "Sharmad Naik"
Date:
Subject: importing of ISO file to Postgresql
Next
From: Max Pyziur
Date:
Subject: Re: importing of ISO file to Postgresql