From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | Alexey Prohorenko <green(at)usa(dot)dp(dot)ua> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: [LONGINT] Problem |
Date: | 2001-10-25 23:50:59 |
Message-ID: | Pine.BSF.4.21.0110251636300.62091-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
On Thu, 25 Oct 2001, Alexey Prohorenko wrote:
> I am new to PostgreSQL -- (I am migrating from MySQL), so I have
> some, may be "stupid", but still interesting questions.
> Interesting for me. :-)
>
> In MySQL there was type called INT UNSIGNED, where I used
> to keep values from 1 to 4294967295 without any problems.
> 1 is '00000000000000000000000000000001' in binary, and
> 4294967295 is '11111111111111111111111111111111'.
>
> I also was able to do f.e. 'SELECT xxx WHERE (xxx & 2147483648)'
> and get everything I want.
> 2147483648 is '10000000000000000000000000000000' in binary.
>
> Nevertheless, with PostgreSQL I have troubles. I didn't find
> any type which will help me to do everything above mentioned.
>
> May be someone of you was in the same situation, or has enough
> knowledge to help me with that?
I think all of the postgres types are signed. An int8 will store the
values (at the cost of alot of extra bits). I think if you were
willing to do a little coding you'd probably be able to make a
uint4 type (but I don't know what'd be involved in actually doing that)
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2001-10-26 00:15:02 | Re: UNICODE |
Previous Message | Stephan Szabo | 2001-10-25 23:35:14 | Re: Triggers after insert |
From | Date | Subject | |
---|---|---|---|
Next Message | Oleg Lebedev | 2001-10-26 00:45:35 | rollback |
Previous Message | Aasmund Midttun Godal | 2001-10-25 21:22:44 | Re: autoincrement |