Re: Alternative variable length structure - Mailing list pgsql-hackers

From ITAGAKI Takahiro
Subject Re: Alternative variable length structure
Date
Msg-id 20050909092546.4B2B.ITAGAKI.TAKAHIRO@lab.ntt.co.jp
Whole thread Raw
In response to Re: Alternative variable length structure  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Alternative variable length structure
List pgsql-hackers
Josh Berkus <josh@agliodbs.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




pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Rendezvous/Bonjour broken in 8.1 beta
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] 8.1beta timezone question