Saturday, September 6, 2008

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

On Sun, Aug 31, 2008 at 3:35 PM, Ryan Bradetich <> 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;
(1 row)

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

postgres=# select -5::uint1 + 30::uint1;
(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

attached a Makefile that fix that

i still have to make some more test...

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

No comments: