Fri, Jun 08, 2001 at 12:22, J.H.M. Dassen (Ray) wrote:
>
> Julien Jehannet <Julien.Jehannet@SecurityKeepers.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