Re: 21 bit number for sequence - Mailing list pgsql-general

From Tom Lane
Subject Re: 21 bit number for sequence
Date
Msg-id 18406.1145117095@sss.pgh.pa.us
Whole thread Raw
In response to Re: 21 bit number for sequence  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:
> If you just want to store numbers, use numeric. Why do you want to
> combine numeric and a sequence?

He could use a numeric column and write the default as
    nextval('seq')::numeric

Of course, he'll be paying through the nose performance-wise for
his insistence on not fixing his Oracle-centric data representation,
but if programmer time is cheaper than machine time then maybe it's
the right tradeoff.

            regards, tom lane

pgsql-general by date:

Previous
From: Francisco Reyes
Date:
Subject: Re: Hardware related question: 3ware 9500S
Next
From: Francisco Reyes
Date:
Subject: Re: Asking advice on speeding up a big table