Re: [HACKERS] [PgFoundry] Unsigned Data Types

2008-08-17 Thread Ryan Bradetich
On Sat, Aug 16, 2008 at 10:53 AM, Decibel! [EMAIL PROTECTED] wrote:

 On Aug 15, 2008, at 1:00 AM, Ryan Bradetich wrote:

 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 project.



 Is the intention for the types to go into pg_catalog? It'd be nice if you
 could specify what schema they should be installed in. An uninstall would
 also be good.


The pg_catalog made since to me at first (especially for my application),
but on reflection I believe you are right.   I will remove the references to
the pg_catalog schema and allow the user to add the unsigned data type to
any schema.  Good catch on the uninstall script.  I should have written this
as well.   I will post an update to the wiki later tonight.



 Thanks for doing this, I've wished we had uint types in the past, and I'm
 sure I will again in the future!


I am glad it is useful.  I needed it for my current project, and I was
hoping others could use it as well.

Thanks,

- Ryan


Re: [HACKERS] [PgFoundry] Unsigned Data Types

2008-08-17 Thread Asko Oja
I can say that we have had several times to use bigint instead because of
the lack of uint type in postgres.

On Sun, Aug 17, 2008 at 9:03 PM, Ryan Bradetich [EMAIL PROTECTED]wrote:

 On Sat, Aug 16, 2008 at 10:53 AM, Decibel! [EMAIL PROTECTED] wrote:

 On Aug 15, 2008, at 1:00 AM, Ryan Bradetich wrote:

 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 project.



 Is the intention for the types to go into pg_catalog? It'd be nice if you
 could specify what schema they should be installed in. An uninstall would
 also be good.


 The pg_catalog made since to me at first (especially for my application),
 but on reflection I believe you are right.   I will remove the references to
 the pg_catalog schema and allow the user to add the unsigned data type to
 any schema.  Good catch on the uninstall script.  I should have written this
 as well.   I will post an update to the wiki later tonight.



 Thanks for doing this, I've wished we had uint types in the past, and I'm
 sure I will again in the future!


 I am glad it is useful.  I needed it for my current project, and I was
 hoping others could use it as well.

 Thanks,

 - Ryan





Re: [HACKERS] [PgFoundry] Unsigned Data Types

2008-08-16 Thread Decibel!

On Aug 15, 2008, at 1:00 AM, Ryan Bradetich wrote:
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 project.



Is the intention for the types to go into pg_catalog? It'd be nice if  
you could specify what schema they should be installed in. An  
uninstall would also be good.


Thanks for doing this, I've wished we had uint types in the past, and  
I'm sure I will again in the future!

--
Decibel!, aka Jim C. Nasby, Database Architect  [EMAIL PROTECTED]
Give your computer some brain candy! www.distributed.net Team #1828




smime.p7s
Description: S/MIME cryptographic signature


[HACKERS] [PgFoundry] Unsigned Data Types

2008-08-15 Thread Ryan Bradetich
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
project.

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
Linux.

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?

Thanks,

- Ryan


uint.c.gz
Description: GNU Zip compressed data


uint.sql.gz
Description: GNU Zip compressed data


pg_atoui.c.gz
Description: GNU Zip compressed data


Makefile
Description: Binary data


tests.tar.gz
Description: GNU Zip compressed data

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers