Skip site navigation (1) Skip section navigation (2)

Re: [PgFoundry] Unsigned Data Types [1 of 2]

From: "Jaime Casanova" <jcasanov(at)systemguards(dot)com(dot)ec>
To: "Ryan Bradetich" <rbradetich(at)gmail(dot)com>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [PgFoundry] Unsigned Data Types [1 of 2]
Date: 2008-09-06 20:41:29
Message-ID: 3073cc9b0809061341q5c747488i85491e4c8e2420ba@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-patches
On Sun, Aug 31, 2008 at 3:35 PM, Ryan Bradetich <rbradetich(at)gmail(dot)com> wrote:
> Hello all,
>

a few comments.

- i think you have to add some more comments in uint.c file and maybe
a header indicating this is part of the postgresql project or that is
intended to use with postgres or something of the like

- what is uint1? i know int, int2, int4, int8 so i think we should
have uint, uint2, uint4 (maybe uint8?)

>    uint-base.tar.bz2  -- The core of the unsigned integer type.

seems there is something wrong in the unlikely macro (i'm using GCC
4.2.3 in Ubuntu 4.2.3-2ubuntu7 with amd64)

postgres=# select -256::uint1;
ERROR:  uint1 out of range
STATEMENT:  select -256::uint1;
ERROR:  uint1 out of range
postgres=# select -255::uint1;
 ?column?
----------
     -255
(1 row)

postgres=# select -2::uint1;
 ?column?
----------
       -2
(1 row)

postgres=# select -5::uint1 + 30::uint1;
 ?column?
----------
       25
(1 row)

>    uint-tests.tar.bz2  -- The regression tests.
>

here failed two regression tests but that is because the path

>    * Converted build system to use PGXS (more portable).

the Makefile doesn't work here... i have installed postgres 8.3.3 from
ubuntu package and the test env i compile manually (the uint module
tried to install in the ubuntu location while it should in the env
location)

attached a Makefile that fix that

i still have to make some more test...

-- 
regards,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. (593) 87171157

Attachment: regression.diffs
Description: application/octet-stream (3.8 KB)
Attachment: Makefile
Description: application/octet-stream (655 bytes)

In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2008-09-06 20:57:57
Subject: Re: [PgFoundry] Unsigned Data Types [1 of 2]
Previous:From: Alex HunsakerDate: 2008-09-06 19:58:20
Subject: Re: to_date() validation

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group