pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Martijn van Oosterhout <kleptog@svana.org>
To: Salem Berhanu <salemb4@hotmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: postgres & server encodings
Date: Tue, 9 Aug 2005 17:59:46 +0200
Message-ID: <20050809155946.GF8244@svana.org> (raw)
In-Reply-To: <BAY103-F36DC25F51006C5179B29E0EFB80@phx.gbl>
References: <BAY9-F39yzvZlhK3CHl0007db08@hotmail.com>
	<BAY103-F36DC25F51006C5179B29E0EFB80@phx.gbl>

On Mon, Aug 08, 2005 at 04:10:50PM +0000, Salem Berhanu wrote:
> What exactly is the SQL_ASCII encoding in postgres? I have a pg 
> installation with an SQL_ASCII server encoding and my database (also 
> SQL_ASCII) seems to be able to handle all types of encodings? how is this 
> possible? is this what the server & db encoding needs to be set to in order 
> to handle various encodings?

SQL_ASCII means that the database does no locale specific or language
specific encoding ever. It won't check what you send it either. If
you're content to let clients deal with any encoding issues, this may
be what you want.

But anything to do with lower(), upper(), case-insenstive in the
database itself will be totally stupid since it's assuming ASCII.

> Also is there a way of dumping data from an SQL_ASCII db to a UNICODE db. 
> Creating a dump and converting with a tool like iconv is probably not an 
> option since the data in the SQL_ASCII db has unknown/inconsistant encoding.
> Please let me know as soon as possible.

This is a messy situation. Since the system can't guess your encoding
you'd have to fix it all up yourself...

Hope this helps,
-- 
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

view thread (9+ messages)  latest in thread

Message-ID: <20050809155946.GF8244@svana.org>
Permalink:  ../20050809155946.GF8244@svana.org/
Also on:    postgresql.org/message-id/20050809155946.GF8244@svana.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: kleptog@svana.org, salemb4@hotmail.com, pgsql-general@postgresql.org
  Subject: Re: postgres & server encodings
  In-Reply-To: <20050809155946.GF8244@svana.org>
  References: <BAY9-F39yzvZlhK3CHl0007db08@hotmail.com> <BAY103-F36DC25F51006C5179B29E0EFB80@phx.gbl> <20050809155946.GF8244@svana.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox