Re: Unsigned integer types

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Jim Nasby <jim(at)nasby(dot)net>
Cc: Maciej Gajewski <maciej(dot)gajewski0(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Unsigned integer types
Date: 2013-05-28 23:00:29
Message-ID: 20130528230029.GD3203@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 28, 2013 at 05:57:41PM -0500, Jim Nasby wrote:
> On 5/28/13 4:07 PM, Bruce Momjian wrote:
> >On Tue, May 28, 2013 at 11:17:42AM +0200, Maciej Gajewski wrote:
> >>2. INTEGER
> >>
> >>I had to store a record with several uint32. I had to store an awful
> >>lot of them; hundreds GB of data per day. Roughly half of the record
> >>consists of uint32 fields.
> >>Increasing the data type to bigint would mean that I could store 3
> >>instead of 4 days worth of data on available storage.
> >>Continuing with int4 meant that I would have to deal with the data in
> >>special way when in enters and leaves the DB. It's easy in C: just
> >>cast uint32_t to int32_t. But python code requires more complex
> >>changes. And the web backend too...
> >>
> >>It's suffering either way!
> >>
> >>Just imagine the conversation I had to have with my boss: "Either
> >>we'll increase budged for storage, or we need to touch every bit of
> >>the system".
> >
> >Did you try 'oid' as an unsigned int4?
>
> Using an internal catalog type for user data seems like a horrible idea to me...

Uh, not sure if we can say oid is only an internal catalog type. It is
certainly used for storing large object references.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2013-05-28 23:05:07 Re: Planning incompatibilities for Postgres 10.0
Previous Message David Johnston 2013-05-28 22:59:52 Re: Unsigned integer types