pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: Detecting SQL_ASCII databases
Date: Thu, 23 Sep 2004 12:29:48 +1200
Message-ID: <415218FC.9010801@opencloud.com> (raw)
In-Reply-To: <Pine.BSO.4.56.0409200426450.12765@leary.csoft.net>
References: <414CB84A.2050107@opencloud.com>
	<Pine.BSO.4.56.0409200426450.12765@leary.csoft.net>

Kris Jurka wrote:
> 
> On Sun, 19 Sep 2004, Oliver Jowett wrote:
> 
> 
>>8.0 backends report the server_encoding value of the database via 
>>ParameterStatus during startup. I'd like to use this to detect SQL_ASCII 
>>databases and complain loudly.
> 
> 
> That would certainly help people who have setup their databases
> incorrectly, but it is actually legal to have a setup like this as long as
> you only use seven bit ascii characters.

We could support this case by requiring charSet=SQL_ASCII to be 
specified if you have this case. (this would set client_encoding = 
SQL_ASCII and interpret data as US-ASCII).

Part of the problem is that SQL_ASCII seems to mean "just store whatever 
I'm given directly"; there is no real "7-bit ascii only" encoding?

> I'm not sure where I stand on
> this.  There are probably plenty of databases that are working fine with
> the current setup.  For example even using 8 bit chars in a SQL_ASCII
> database, if all clients are unicode then the only problem you'll see is
> the length check in something like varchar(100) failing.

We could support this with charSet=UNICODE (set client_encoding = 
SQL_ASCII and interpret data as UTF-8)

-O



view thread (4+ messages)  latest in thread

Message-ID: <415218FC.9010801@opencloud.com>
Permalink:  ../415218FC.9010801@opencloud.com/
Also on:    postgresql.org/message-id/415218FC.9010801@opencloud.com

 · 

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-jdbc@postgresql.org
  Cc: oliver@opencloud.com, books@ejurka.com
  Subject: Re: Detecting SQL_ASCII databases
  In-Reply-To: <415218FC.9010801@opencloud.com>
  References: <414CB84A.2050107@opencloud.com> <Pine.BSO.4.56.0409200426450.12765@leary.csoft.net> <415218FC.9010801@opencloud.com>

* 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