Re: Defining character sets for indicidual fields

From: Steve Atkins <steve(at)blighty(dot)com>
To: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Defining character sets for indicidual fields
Date: 2008-06-01 01:34:11
Message-ID: 6403D578-4BB8-4C4A-BC55-87375FDF9080@blighty.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On May 31, 2008, at 6:22 PM, Ram Ravichandran wrote:

> Hi,
>
> By default, my postgresql server is set to use UTF8 character set. I
> was wondering if there is any way to make sure that certain fields
> like url etc. only makes use of ascii. My main aim is to save space
> by using only 1 byte / character for urls (some of the urls are
> over 200 characters long). Is this possible? Or are all characters
> eventually converted to UTF8 during storage?

An ascii string and the UTF8 representation of it will take exactly
the same number of bytes, so if space used is your concern it's not an
issue.

Cheers,
Steve

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tino Wildenhain 2008-06-01 08:34:28 Re: Defining character sets for indicidual fields
Previous Message Ram Ravichandran 2008-06-01 01:22:56 Defining character sets for indicidual fields