Re: Alternative variable length structure

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Alternative variable length structure
Date: 2005-09-09 01:09:47
Message-ID: 20050909092546.4B2B.ITAGAKI.TAKAHIRO@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus <josh(at)agliodbs(dot)com> wrote:

> Wouldn't this require creating, for example, a SHORTTEXT type?

Yes, new types are required. There are no binary compatibility between
them and existing variable length types (text, bytea, etc.).
But 'SHORTTEXT' is not a proper name for them. They can represent
long texts though they are optimized for short ones.

We might be able to optimize types further if we create different types
for each length, for example, tinytext for length < 256,
shorttext for 64K, mediumtext for 16MB ...
But I think this is not appropriate. It forces users to choose one
from several text types and we will have to maintain them.

> Or were you planning this to handle VARCHAR(6) and the like?

If the new text type wins VARCHAR in many respects,
I'd like to propose to replace VARCHAR with it.

---
ITAGAKI Takahiro
NTT Cyber Space Laboratories

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-09-09 02:32:45 Re: [GENERAL] 8.1beta timezone question
Previous Message Joshua D. Drake 2005-09-09 00:49:15 Re: Rendezvous/Bonjour broken in 8.1 beta