From: | Julien Jehannet <Julien(dot)Jehannet(at)SecurityKeepers(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Re: why unsigned numbers don't exist ? |
Date: | 2001-06-08 13:07:27 |
Message-ID: | 20010608130727.C32153@SecurityKeepers.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Fri, Jun 08, 2001 at 12:22, J.H.M. Dassen (Ray) wrote:
>
> Julien Jehannet <Julien(dot)Jehannet(at)SecurityKeepers(dot)com> wrote:
> > I am newbie with PostgreSQL and I ask myself if it's possible to have
> > unsigned numbers.
>
> As far as I know, there is no separate data type for unsigned numbers, but
> you can of course use CHECK constraints like
>
> age INTEGER CHECK (age >= 0),
>
> (see http://www.ca.postgresql.org/docs/aw_pgsql_book/node132.html)
Thanks but in fact, I don't want to test if a number is just positive, I would use the whole
range of an int4 from 0 to (2147483647*2).
For example, if I use a serial, the range is between 0 and (2147483647*2).
(humm, it may be possible to start the sequence with -2147483647 but I don't
test).
Well, this is my true problem:
I have converted my date format into the unix time because I have a lot of basic tests to do with the data.
Normally, a unsigned int4 is only needed but, like it's signed, I must to use a int8 or a NUMERIC(10).
Do you think my method is stupid or have some good best practices to propose
me.
Thanks,
jul
P.S. Sorry for my poor english...
--
(work) Julien.Jehannet at SecurityKeepers.com
(home) jhanet at caramail.com
'Early to rise and early to bed makes a man healthy but socially dead.'
Animaniacs, série burlesque américaine
From | Date | Subject | |
---|---|---|---|
Next Message | zilch | 2001-06-08 13:13:22 | Re: libpq compile error |
Previous Message | Olivier Cherrier | 2001-06-08 12:57:51 | compile error using libpq |