Re: Converting MySQL tinyint to PostgreSQL

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Joe <svn(at)freedomcircle(dot)net>, Dawid Kuroczko <qnex42(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Converting MySQL tinyint to PostgreSQL
Date: 2005-07-13 03:50:52
Message-ID: 87vf3fz7mr.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Certainly the idea of not having to store a length word for CHAR(1) fields
> is not going to inspire anyone to invest the effort involved ;-)

That's a pretty big motivation though. Storage space efficiency is a huge
factor in raw sequential scan speed.

Personally I would settle for a fuller set of small fixed size datatypes. The
"char" datatype is pretty much exactly what's needed except that it provides
such a quirky interface.

I'm not sure exactly how to clean it up but if it were more user-friendly (and
had less of an "undocumented internal feature" character to it) I have a
feeling a lot of people would be using for things like flags, state codes,
etc. And it would reduce storage space significantly over having lots of text
or even integer fields.

--
greg

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-07-13 04:15:03 Re: Converting MySQL tinyint to PostgreSQL
Previous Message Matthew Terenzio 2005-07-13 03:47:36 Re: current_timestamp - 20 minutes