no unsigned data types in ingres sql

DATABASE

    Sponsored Links

    Next

  • 1. RSS Feeds
    Does any ony know where I can get a RSS feed for Ingres? TIA

no unsigned data types in ingres sql

Postby morgan brickley » Sat, 10 Sep 2005 01:30:21 GMT

I've noticed that there's no unsigned data types in ingres sql.  This is 
a problem for us as we need to allow access to a table usign unsigned 
64-bit integers generated from afar (an authentication agent)...The 
current solution is to base64 encode the 8byte values, producing 11byte 
varchars that can at least be stored, compared etc. safely.  The further 
I go with this solution however the less I like it as I need to do quite 
a bit of base64 encoding and decoding in python, where previouslt I 
could do inserts etc with no fear of overflowing...

ie. I'm using the python dbi driver to execute strings containing CRUD 
operations like

INSERT into table (id) values (someNumberGreaterThan2TothePowerOf63)

will produce an error as someNumberGreaterThan2TothePowerOf63 is in 
string form and will be out of range.

As this is the index to the table, I can't use the binary types.

Any ideas?

Morgan

Re: no unsigned data types in ingres sql

Postby Emiliano » Sat, 10 Sep 2005 04:37:34 GMT



Wouldn't a DECIMAL(19,0) suffice?

Emiliano

Similar Threads:

1.[Info-ingres] no unsigned data types in ingres sql

At 5:30 PM +0100 9/8/2005, morgan brickley wrote:
>I've noticed that there's no unsigned data types in ingres sql.  This is a problem for us as we need to allow access to a table usign unsigned 64-bit integers generated from afar (an authentication agent)...The current solution is to base64 encode the 8byte values, producing 11byte varchars that can at least be stored, compared etc. safely.  The further I go with this solution however the less I like it as I need to do quite a bit of base64 encoding and decoding in python, where previouslt I could do inserts etc with no fear of overflowing...
>
>ie. I'm using the python dbi driver to execute strings containing CRUD operations like
>
>INSERT into table (id) values (someNumberGreaterThan2TothePowerOf63)
>
>will produce an error as someNumberGreaterThan2TothePowerOf63 is in string form and will be out of range.

The SQL Standard doesn't allow for unsigned numeric types.

You can however take your unsigned number and send it to Ingres as if it
were signed.  E.g. 2703443303 (0xa1234567) can be sent as -1591523993.
It's the same bit-pattern, just ascii-ized differently.

Karl

2.Informix Serial Data type to Integer Data Type

We have 2 Java applications and some Esql/c scripts inserting/updating
data into Informix 9.30 Dynamic server tables simultaneously. At
present the Primary keys in these tables are of Informix Serial data
type. Now we are planning to change Serial data type to Integer data
type. May I know the possible (options/changes/any issues which may
occur) which need to be done for achieving the same?

Thanks in advance
Sarat
 XXXX@XXXXX.COM 

3.[Info-Ingres] Why BOOLEAN data type not provided in Ingres

4.SQL Server ntext type <--> Ingres

5.Use composite type for column data type

6. Is there a long data type in Ingres ?

7. Why BOOLEAN data type not provided in Ingres

8. [Info-Ingres] "Custom" data types



Return to DATABASE

 

Who is online

Users browsing this forum: No registered users and 3 guest