Received: from localhost (pluto.hub.org [200.46.204.4]) by postgresql.org (Postfix) with ESMTP id 0260A9F946B for ; Sat, 18 Nov 2006 20:30:41 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.4]) (amavisd-new, port 10024) with ESMTP id 04928-09 for ; Sat, 18 Nov 2006 20:30:33 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from isb.com.pl (poczta.isb.com.pl [80.48.198.2]) by postgresql.org (Postfix) with ESMTP id C292A9F946A for ; Sat, 18 Nov 2006 20:30:37 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by isb.com.pl (Postfix) with ESMTP id EF781B13B9 for ; Sun, 19 Nov 2006 01:33:57 +0100 (CET) Received: from isb.com.pl ([127.0.0.1]) by localhost (isb.com.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 15267-08 for ; Sun, 19 Nov 2006 01:33:57 +0100 (CET) Received: from mail.isb.com.pl (localhost.localdomain [127.0.0.1]) by isb.com.pl (Postfix) with ESMTP id 94415B13B6 for ; Sun, 19 Nov 2006 01:33:57 +0100 (CET) From: "lms" To: pgsql-sql@postgresql.org Subject: Re: How convert UNICODE Date: Sun, 19 Nov 2006 01:33:57 +0100 Message-Id: <20061119003111.M86685@inetcafe.eu.org> In-Reply-To: References: <20061117165852.M2045@isb.com.pl> <20061117230302.M62231@inetcafe.eu.org> X-Mailer: Open WebMail 2.50 20050106 X-OriginatingIP: 80.48.198.7 (piechcio) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at isb.com.pl X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/203 X-Sequence-Number: 26855 Hi I must copy rows from local database (UNICODE) to remote database SQL_ASCII (not on local machine) with converting selected columns to iso8859_2 or iso_8859_5. Can I make it with COPY? On Sat, 18 Nov 2006 09:42:14 -0500, Travis Whitton wrote > You can use the postgresql COPY command to dump a single column to a file. Do this for each column you need to convert. From there, use iconv to convert the data. When you're done dumping and converting, use the unix paste command to reassemble the data. If you're not on a unix-based platform, a simple perl script should do the job.