dump encoding (was Re: 8.2 beta blockers)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paesold <mpaesold(at)gmx(dot)at>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: dump encoding (was Re: 8.2 beta blockers)
Date: 2006-09-18 13:48:38
Message-ID: 26903.1158587318@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paesold <mpaesold(at)gmx(dot)at> writes:
>> * Set client encoding based on OS environment - Peter E.

> I really hope that this change will only affect psql, not pg_dump, as Peter
> wrote in 2003. I would strongly object to such a change (as much as my
> voice counts). The current behavior of dumping with the database encoding
> is exactly the right thing to do.

Actually, I realize after a quick look at the pg_dump code that its
current behavior is to dump in
1. Specified encoding if a -E switch is given.
2. PGCLIENTENCODING, if that environment var exists.
3. Else, server encoding.
So there's already an environment dependency, although it's for
something much less likely to be set than LANG. I tend to agree
that we'd better avoid having dumps depend on LANG ... wonder if
we should remove the dependency on PGCLIENTENCODING too.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lukas Kahwe Smith 2006-09-18 13:49:29 Re: [pgsql-www] Developer's Wiki
Previous Message Gevik Babakhani 2006-09-18 13:40:01 new language translation (.po)