X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id AEDA1D1CCB3 for ; Mon, 26 Jan 2004 17:06:52 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 46165-04 for ; Mon, 26 Jan 2004 13:06:22 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 5F002D1BA8B for ; Mon, 26 Jan 2004 13:06:21 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id i0QH5tnX008422; Mon, 26 Jan 2004 12:05:55 -0500 (EST) To: "Iain" Cc: pgsql-admin@postgresql.org Subject: Re: Can I change the character encoding for a DB? In-reply-to: <000901c3e3e6$6cd00060$7201a8c0@mst1x5r347kymb> References: <000901c3e3e6$6cd00060$7201a8c0@mst1x5r347kymb> Comments: In-reply-to "Iain" message dated "Mon, 26 Jan 2004 17:28:49 +0900" Date: Mon, 26 Jan 2004 12:05:55 -0500 Message-ID: <8421.1075136755@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/236 X-Sequence-Number: 12099 "Iain" writes: > I created a DB with SQL_ASCII encoding but I want to change it to EUC_JP. > Can I do this without creating a new database? If you're certain that the data already in the database is in EUC_JP encoding, it would probably work to do a quick UPDATE on the pg_database.encoding entry for the database (and then start fresh backend sessions, since they won't notice otherwise). If there's data in there that is not correct per EUC_JP then this will create big problems, so don't say I didn't warn you ... regards, tom lane