Re: Datatype sizes; a space and speed issue? - Mailing list pgsql-general

From Joel Matthew
Subject Re: Datatype sizes; a space and speed issue?
Date
Msg-id 20040623134053.EA37.REES@ddcom.co.jp
Whole thread Raw
In response to Re: Datatype sizes; a space and speed issue?  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-general
> Both text and varchar are stored in PostgreSQL as length + string so
> varchar(256) doesn't not require storage of the unused bytes.  char space
> pads so it's the oddball (requiring length + padded string).

Yeah, I saw Vams's post and r3m3mb3r3d that I'd f0rg0t.

> varchar lengths should be in characters not bytes, so that should be 128
> characters in any of the encodings, but the actual number of bytes that
> those 128 characters can take up may vary.

And that's actually the best rationale, IMO, for making the optimization
a full-fledged feature. Boy, the things you forget ...

--
Joel Matthew <rees@ddcom.co.jp>


pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Datatype sizes; a space and speed issue?
Next
From: Alvaro Herrera
Date:
Subject: Re: Datatype sizes; a space and speed issue?