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

From Tom Lane
Subject Re: Datatype sizes; a space and speed issue?
Date
Msg-id 27788.1087971735@sss.pgh.pa.us
Whole thread Raw
In response to Re: Datatype sizes; a space and speed issue?  (Joel Matthew <rees@ddcom.co.jp>)
List pgsql-general
Joel Matthew <rees@ddcom.co.jp> writes:
> Does that mean that PostGreSQL fixes character width at thirty-two bits,
> or that it uses UTF-8, or that it just stores what it gets?

We store text data in the form indicated by the database encoding
setting.  UCS-32 is not a supported encoding, but UTF-8 is --- among
others.

> (Checked chapter 8.3 in the manual, didn't see the answer there. Not
> that I really want to know. With Unicode, trying to optimize record
> sizes for char/text fields is a little like trying to play Russian
> Roulette.

No, it's entirely like pointless.  You just don't know how many bytes
will be taken up by N characters.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Datatype sizes; a space and speed issue?
Next
From: Tom Lane
Date:
Subject: Re: Do we need more emphasis on backup?