Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VAIOb-000615-LL for pgsql-it-generale@arkaria.postgresql.org; Fri, 16 Aug 2013 11:40:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VAIOb-0006G8-49 for pgsql-it-generale@arkaria.postgresql.org; Fri, 16 Aug 2013 11:40:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VAIOa-0006G1-Be for pgsql-it-generale@postgresql.org; Fri, 16 Aug 2013 11:40:44 +0000 Received: from smtpdg224.aruba.it ([62.149.158.224] helo=smtpdg6.aruba.it) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VAIOW-0003P6-BC for pgsql-it-generale@postgresql.org; Fri, 16 Aug 2013 11:40:43 +0000 Received: from 756b4.gi.lan ([78.149.125.152]) by smtpcmd02.ad.aruba.it with bizsmtp id DPgd1m00i3HQHWu01Pge52; Fri, 16 Aug 2013 13:40:38 +0200 Received: by 756b4.gi.lan (masqmail 0.3.4, from userid 1000) id 1VAINj-2Mf-00; Fri, 16 Aug 2013 13:39:51 +0200 Date: Fri, 16 Aug 2013 13:39:51 +0200 From: Gianni Ciolli To: pgsql-it-generale@postgresql.org Cc: "ciifrancesco@tiscali.it" Subject: Re: =?iso-8859-1?Q?Nov?= =?iso-8859-1?B?aXTg?= -- problema Cinese in DB UTF8 Message-ID: <20130816113951.GA23800@756b4.gi.lan> References: <8015825.7251376466328701.JavaMail.defaultUser@defaultHost> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8015825.7251376466328701.JavaMail.defaultUser@defaultHost> User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-it-generale Precedence: bulk Sender: pgsql-it-generale-owner@postgresql.org On Wed, Aug 14, 2013 at 09:45:28AM +0200, ciifrancesco@tiscali.it wrote: > Allora, > ho fatto i seguenti passi: > 1. ho modificato i template in modo che anche essi siano: > > Name | Owner | Encoding | Collate | Ctype | Access privileges > ----------+-------+----------+-------------+-------------+------------------- > postgres | pedro | UTF8 | it_IT.UTF-8 | it_IT.UTF-8 | > mioDB | pedro | UTF8 | it_IT.UTF-8 | it_IT.UTF-8 | > template0 | pedro | UTF8 | it_IT.UTF-8 | it_IT.UTF-8 | > template1 | pedro | UTF8 | it_IT.UTF-8 | it_IT.UTF-8 | Č fortemente sconsigliato alterare template0, che infatti non puņ essere alterato senza seguire procedure discutibili come quella riportata in calce. Se non si vuole o puņ usare il template di default template1, che infatti č editabile, si puņ fare una copia di template0 e poi alterare questa copia. Funziona ugualmente, dal momento che nel creare un nuovo database si puņ usare un qualsiasi database come template. > 4. quindi cerco di rimettere i dati nel DB: > gunzip -c filename.gz | psql dbnamema il DB risulta vuoto a dispetto della lunghezza dell'operazione e l'assenza di errori. Usare il metodo > cat filename.gz | gunzip | psql dbnamenon cambia niente. Entrambi sono su http://www.postgresql.org/docs/9.1/static/backup-dump.html > mioDB=# \dv > No relations found. Non č possibile che, in assenza di errori, i dati non siano stati ripristinati. Quasi sicuramente le nuove tabelle sono state create in degli schemi che non sono contenuti nel search_path, e quindi non sono visibili con un semplice "\dv". Con "\dn" si vedono tutti gli schemi disponibili. Riferimenti su search_path: http://www.postgresql.org/docs/9.3/static/ddl-schemas.html#DDL-SCHEMAS-PATH Cordiali saluti, Dr. Gianni Ciolli - 2ndQuadrant Italia PostgreSQL Training, Services and Support gianni.ciolli@2ndquadrant.it | www.2ndquadrant.it -- Sent via pgsql-it-generale mailing list (pgsql-it-generale@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-it-generale