Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id MAA02261 for postgres-dist; Fri, 1 Apr 1994 12:50:22 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199404012050.MAA02261@nobozo.CS.Berkeley.EDU>
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id MAA02252; Fri, 1 Apr 1994 12:50:21 -0800
Message-Id: <199404012050.MAA02252@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
From: aoki@postgres.Berkeley.EDU (Paul M. Aoki)
To: wklaw1@ie.cuhk.hk
Cc: postgres@postgres.Berkeley.EDU
Subject: Re: signed or unsiged type ??!! 
Reply-To: aoki@postgres.Berkeley.EDU (Paul M. Aoki)
In-reply-to: Your message of Fri, 1 Apr 94 18:11:34 +0800 
	     <9404011011.AA06268@ieug54.ie.cuhk.hk> 
Date: Fri, 01 Apr 94 12:50:21 -0800
X-Sender: aoki@postgres.Berkeley.EDU
Resent-To: postgres-dist@postgres.Berkeley.EDU
X-Mts: smtp
Resent-Date: Fri, 01 Apr 94 12:50:22 -0800
Resent-XMts: smtp

wklaw1@ie.cuhk.hk writes:
> 	I am wondering whether the type, int2, is signed or unsigned..
> The User Manual tells me that int2 is SIGNED integer, but I found that
> it should be UNSIGNED integer since if I assigned a negative number
> to an attribute (which defined as int2), an error will be reported by
> Postgres....  I doubt is there any mistake I made or I misunderstand 
> while creating the tables. Any advice is appreciated, THANK YOU

actually, they *are* signed.  this is actually a bug in the parser 
and its understanding of the "-" operator.  sunita fixed this for 
4.2, but for 4.x (x<2) you have to enter int2 and float4 constants as
	"-8234"::int2
	"-1.483485"::float4
--
  Paul M. Aoki  |  CS Div., Dept. of EECS, UCB  |  aoki@postgres.Berkeley.EDU
                |  Berkeley, CA 94720           |  ...!uunet!ucbvax!aoki
