Re: Reducing data type space usage - Mailing list pgsql-hackers

From Bort, Paul
Subject Re: Reducing data type space usage
Date
Msg-id DB106B1B5B8F734B8FF3E155A3A556C202D4FFC5@clemail1.tmwsystems.com
Whole thread Raw
In response to Re: Reducing data type space usage  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
Gregory Stark writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
> >
> > There isn't if you want the type to also handle long strings.
> > But what if we restrict it to short strings?  See my
> message just now.
>
> Then it seems like it imposes a pretty hefty burden on the user.
>

But there are a lot of places where it wins:
- single byte for a multi-state flag
- hex representation of a hash (like SHA-1)
- part numbers
- lots of fields imported from legacy systems
- ZIP/Postal codes

And for all of those you can decisively say at design time that 127
characters is an OK limit.

+1 for Bruce/Tom's idea.

Regards,
Paul Bort


pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: The enormous s->childXids problem
Next
From: "Nicolas Barbier"
Date:
Subject: Re: Optimize ORDER BY ... LIMIT