Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Proposed TODO: --encoding option for pg_dump

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: <josh(at)agliodbs(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Cc: "PostgreSQL-patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Proposed TODO: --encoding option for pg_dump
Date: 2005-06-28 20:24:19
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE094571@algol.sollentuna.se (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
> There's no time to do this for 8.1, but I'd like to get it on 
> the books for
> 8.2:
> 
> The Problem:  Occassionally a DBA needs to dump a database to a new 
> encoding.   In instances where the current encoding, (or lack of an 
> encoding, like SQL_ASCII) is poorly supported on the target 
> database server, it can be useful to dump into a particular 
> encoding.  But, currently the only way to set the encoding of 
> a pg_dump file is to change 
> client_encoding in postgresql.conf and restart postmaster.   
> This is more 
> than a little awkward for production systems.
> 
> The TODO:  add an --encoding=[encoding name] option to 
> pg_dump.  This would set client_encoding for pg_dump's session(s).

I *think* that's easy enough to do in time for 8.1. Trivial patch
attached. I hope it's enough :-) It passed my very quick testing...

(Yup, I read the mails aobut PGCLIENTENCODING, but an option to pg_dump
is certainly easier)

//Magnus

Attachment: pg_dump.sgml.diff
Description: application/octet-stream (727 bytes)
Attachment: pg_dump.diff
Description: application/octet-stream (2.4 KB)

Responses

pgsql-hackers by date

Next:From: Michael PaesoldDate: 2005-06-28 20:31:00
Subject: Re: [PATCHES] Users/Groups -> Roles
Previous:From: Michael PaesoldDate: 2005-06-28 20:08:07
Subject: Re: [PATCHES] Users/Groups -> Roles

pgsql-patches by date

Next:From: Michael PaesoldDate: 2005-06-28 20:31:00
Subject: Re: [PATCHES] Users/Groups -> Roles
Previous:From: Michael PaesoldDate: 2005-06-28 20:08:07
Subject: Re: [PATCHES] Users/Groups -> Roles

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group