Re: CHAR SETS

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: "Cesar Alvarez *EXTERN*" <c(dot)alvarezx66(at)gmail(dot)com>, "PGSQL GEneral Mailing list" <pgsql-general(at)postgresql(dot)org>
Subject: Re: CHAR SETS
Date: 2007-10-15 08:44:53
Message-ID: 87odf0sr5m.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at> writes:

> Cesar Alvarez wrote:
>> I got a question, what are the differences of SQL_ASCII and UTF8, witch
>> one should i use??
> SQL_ASCII is ASCII without encoding checks, UTF8 is UTF-8.
> I think that you should use UTF8.

Pros: UTF8 will let you handle other character sets later on (though Postgres
won't be able to provide locale support for more than one locale at the same
time :( )

Cons: UTF8 is slower for many things, especially LIKE and regexp matching. If
you have a very large database you may not be concerned with cpu usage though.
It also requires extra indexes if you want to be able to use an index for
LIKE. And you can't do substring() or length() on a very large datum without
fetching the whole datum.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurent ROCHE 2007-10-15 09:02:02 Re : pg_dump - schema diff compatibility
Previous Message Gregory Stark 2007-10-15 08:41:25 Re: Using case expressions in update set clause