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

[PgFoundry] Unsigned Data Types

From: "Ryan Bradetich" <rbradetich(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [PgFoundry] Unsigned Data Types
Date: 2008-08-15 06:00:32
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Hello all,

Here is the first pass at the unsigned data type I have been working on.

I am planning on adding these to the September 2008 commitfest wiki page.
The unsigned data type is not targeted for core, but for the uint PgFoundry

The uint.c.gz file is the main source file for the uint1, uint2, and uint4
data types.
The uing.sql.gz file contains the SQL statements to add the unsigned data
type to the database.
The pg_atoui.c.gz file is based off the function in the PostgreSQL source
code but works for unsigned data types instead of signed data types.
The Makefile is used to build the unsigned data type shared library on

The tests.tar.gz is my unit test suit that I worked on to make sure the
unsigned integer types worked as expected.

The tests cover cases like:
    * table creation with the unsigned integer types.
    * comparision operations.
    * INSERT statements (binary and text forms).
    * COPY statements (binary and text forms).
    * unique btree index support.

In addition to correctness issues, I would also appreciate feedback on best
practices and portability concerns.

For example:
   I doubt my Makefiles are very portable.
   What is the proper solution to handle this?  pgxs?


- Ryan

Attachment: uint.c.gz
Description: application/x-gzip (1.9 KB)
Attachment: uint.sql.gz
Description: application/x-gzip (1.3 KB)
Attachment: pg_atoui.c.gz
Description: application/x-gzip (1.1 KB)
Attachment: Makefile
Description: application/octet-stream (334 bytes)
Attachment: tests.tar.gz
Description: application/x-gzip (4.7 KB)


pgsql-hackers by date

Next:From: Pavel StehuleDate: 2008-08-15 06:22:58
Subject: Re: proposal sql: labeled function params
Previous:From: Tom LaneDate: 2008-08-15 04:27:04
Subject: Re: proposal sql: labeled function params

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