[plt-dev] pgsql package

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Wed Jul 29 21:44:15 EDT 2009

On Wed, Jul 29, 2009 at 8:38 PM, Ryan Culpepper<ryanc at ccs.neu.edu> wrote:
> Ryan Culpepper wrote:
>> Robby Findler wrote:
>>> Thanks for the reply, Dave!
>>> The encoding of my database is SQL_ASCII which, IIUC, means that the
>>> bug really is in the SCheme code side for putting the data in one way
>>> and expecting it to come out the other way.
>> The server has a communication encoding separate from the storage
>> encodings of the actual databases. Communication should happen in UTF-8, and
>> the server should convert data as necessary on storage and retrieval.
> ... except that, apparently, if the server "encoding" is SQL_ASCII, then the
> data is not transcoded before transmission. So the server might be sending
> out byte sequences that aren't valid according to the client encoding. Grrr!
> http://www.postgresql.org/docs/8.2/static/multibyte.html
> http://lists.exim.org/lurker/message/20070528.055039.01552121.ja.html
>>> I don't suppose you (or anyone!) could recommend how this should work?
>>> If I change the encoding to latin-1 and then change it to utf-8 and
>>> then change it back to SQL_ASCII, woudl htat effectively translate the
>>> entire database to utf-8?
>> I don't know if that would help anything.
> I think I was wrong... changing the encoding of the database to UTF8 seems
> like it might fix it. I don't know if you can change it in-place, though. I
> found some recommendations for converting the database here:
> http://openacs.org/forums/message-view?message_id=190333

Not knowing much about this, I would have guessed that SQL_ASCII would
be a good case for a tool that interaction with the database, since it
means that the tool can control the encoding without having the
database server getting in the way.

Does that seem wrong to you?

I think I understand the commands in that link above, and my
understanding suggests that a) the database has to be encoded
consistently and b) I have to know what that encoding is .... (and the
web page also suggests that I'm wrong about SQL_ASCII).

Also, I've been having some problems with pg_dump (really pg_dumpall)
as far as preserving users goes. But I think that's probably a
question for another time ...


Posted on the dev mailing list.