Re: single byte unsigned integer datatype

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Joe Conway <joe(dot)conway(at)mail(dot)com>
Cc: Postgres SQL list <pgsql-sql(at)postgresql(dot)org>
Subject: Re: single byte unsigned integer datatype
Date: 2001-01-14 15:49:36
Message-ID: Pine.LNX.4.30.0101141648030.977-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net http://yi.org/peter-e/

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Max Pyziur 2001-01-14 20:28:44 Re: importing of ISO file to Postgresql
Previous Message Joe Conway 2001-01-14 15:16:48 single byte unsigned integer datatype