nad2000 / postgresql-contrib-uint

PostgreSQL unsigned integer type extension

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

postgresql-contrib-uint Build Status

This implementation is a branch from http://pgfoundry.org/projects/uint/ by Ryan Bradetich. It provides unsigned 2 byte and unsigned 4 byte data types to postgres 8.1 and greater.

This implementation of uint is in a way similar to https://github.com/maciekgajewski/postgres-uints. But atop of that this implementation provides also uint1.

Major changes made so far

Installation

PATH=<path to your PostgreSQL bin with **pg_config**>:$PATH; make && make install

Usage

postgres=# CREATE EXTENSION uint;
CREATE EXTENSION

postgres=# CREATE TABLE utable (id uint4, val8bit uint1);
CREATE TABLE
postgres=# INSERT INTO utable VALUES (1, 2), (3, 4), (5, 6);
INSERT 0 3
postgres=# SELECT * FROM utable;
 id | val8bit 
----+---------
 1  | 2
 3  | 4
 5  | 6
(3 rows)

postgres=# \d utable 
    Table "public.utable"
 Column  | Type  | Modifiers 
---------+-------+-----------
 id      | uint4 | 
 val8bit | uint1 | 

About

PostgreSQL unsigned integer type extension

License:MIT License


Languages

Language:C 71.2%Language:PLpgSQL 24.6%Language:Shell 1.9%Language:Makefile 1.4%Language:Dockerfile 1.0%