From: Gianni Ciolli <gianni.ciolli@2ndquadrant.it>
To: pgsql-it-generale@postgresql.org
Cc: ciifrancesco@tiscali.it <ciifrancesco@tiscali.it>
Subject: Re: Novità -- problema Cinese in DB UTF8
Date: Fri, 16 Aug 2013 13:39:51 +0200
Message-ID: <20130816113951.GA23800@756b4.gi.lan> (raw)
In-Reply-To: <8015825.7251376466328701.JavaMail.defaultUser@defaultHost>
References: <8015825.7251376466328701.JavaMail.defaultUser@defaultHost>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-it-generale>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-it-generale@postgresql.org
Cc: gianni.ciolli@2ndquadrant.it, ciifrancesco@tiscali.it
Subject: Re: Novità -- problema Cinese in DB UTF8
In-Reply-To: <20130816113951.GA23800@756b4.gi.lan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox