X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 2410B11F620E for ; Wed, 26 Apr 2006 17:12:00 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 04807-01-2 for ; Wed, 26 Apr 2006 17:11:49 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.185]) by postgresql.org (Postfix) with ESMTP id 1E23D11F60E3 for ; Wed, 26 Apr 2006 17:11:47 -0300 (ADT) Received: by nproxy.gmail.com with SMTP id b2so724449nfe for ; Wed, 26 Apr 2006 13:11:47 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=eqqtkhqSSo7uFwBteEw/4Gda5/F3ERGwvoUaN+s6cMq6JzckEypg4qOzKTMk/CKv36ppB/DiwlwuXZQ4DOUDKXb9MGWDSjlcQwC67HQFrPC36wJhTpgtNR4RQOovJ9qIdaKPSmPLP6gsG5SpIpS2xJ7TFpcS1Q2rjn8uZGP1364= Received: by 10.49.35.14 with SMTP id n14mr643071nfj; Wed, 26 Apr 2006 13:11:47 -0700 (PDT) Received: by 10.48.144.19 with HTTP; Wed, 26 Apr 2006 13:11:47 -0700 (PDT) Message-ID: Date: Wed, 26 Apr 2006 16:11:47 -0400 From: "Gregory Maxwell" To: pgsql-admin@postgresql.org Subject: UTF-8 vs ASCII In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <444FD1A8.7060306@nqadmin.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/282 X-Sequence-Number: 21451 On 4/26/06, Prasanth wrote: > Hi, > > Seems like by default database is created using UTF-8 when we use > createdb in 8.1.3. > > Is there any big advantage of using UTF-8 rather than ASCII? Will there > be any performance difference when performing string operations? > > Does the string functions convert every thing to UTF-8 before performing > the operations? > > Surely it is going to increase by database size if we switch to UTF-8. > > All the characters in my database should be ASCII. I use JDBC so will > there be any performance gain as the JDBC does not have to perform the > conversion? Perhaps you are confusing UTF-8 and UTF-16? UTF-8 is a strict superset of ASCII with the same physical encoding for ASCII characters. See: http://en.wikipedia.org/wiki/ASCII and http://en.wikipedia.org/wiki/UTF-8 (and BTW, your email address bounced)