Re: 21 bit number for sequence

From: "Shoaib Mir" <shoaibmir(at)gmail(dot)com>
To: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, "PostgreSQL General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: 21 bit number for sequence
Date: 2006-04-15 07:52:49
Message-ID: bf54be870604150052g10fb9fdbqe6f95eef1d995b1c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Actually what i want to do is store 100000000000000100000 as the maximum
value in sequence. Is there a way for it ?

Thanks,
Shoaib

On 4/15/06, Martijn van Oosterhout <kleptog(at)svana(dot)org> wrote:
>
> On Sat, Apr 15, 2006 at 10:24:59AM +0500, Shoaib Mir wrote:
> > Right now Sequence by default uses bigint which supports upto 19bit
> numbers
> > but I want to use a 21bit that can be supported by NUMERIC datatype. Is
> > there any way I can sepcify while creating a sequence what datatype to
> use
> > or if I can specify to create sequence with numeric datatype?
>
> What do you mean by 19bit? Normal ints support upto 31 bits and bigints
> upto 2^63 positive numbers.
>
> Maybe you mean 19 *digit* numbers, which is about what a bigint can do.
> Well, that's more numbers than you're ever likely to generate so that
> question become: why do you need a sequence with that kind of range?
>
> Have a nice day,
> --
> Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> > tool for doing 5% of the work and then sitting around waiting for
> someone
> > else to do the other 95% so you can sue them.
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
>
> iD8DBQFEQKWlIB7bNG8LQkwRAtp7AJ9365tVEPUqlS8Uks2RpoKebe6vyQCfcWSJ
> h+6EyHJOjWa4QIoFRxtu+SQ=
> =Jpg3
> -----END PGP SIGNATURE-----
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-04-15 08:01:50 Re: 21 bit number for sequence
Previous Message Martijn van Oosterhout 2006-04-15 07:49:57 Re: 21 bit number for sequence