X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id B9D8AD1B4FD for ; Thu, 18 Sep 2003 20:46:17 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 48407-02 for ; Thu, 18 Sep 2003 17:45:46 -0300 (ADT) Received: from dukas.upc.es (dukas.upc.es [147.83.2.62]) by svr1.postgresql.org (Postfix) with ESMTP id B6956D1B526 for ; Thu, 18 Sep 2003 17:45:39 -0300 (ADT) Received: from ackerman.upc.es (ackerman.upcnetadm.upcnet.es [147.83.2.243]) by dukas.upc.es (8.12.1/8.12.1) with ESMTP id h8IKjKcW004180 for ; Thu, 18 Sep 2003 22:45:35 +0200 (MET DST) Received: from est.fib.upc.es ([80.59.140.235]) by ackerman.upc.es (Lotus Domino Release 5.0.9) with ESMTP id 2003091822152942:985 ; Thu, 18 Sep 2003 22:15:29 +0200 Message-ID: <3F6A1508.5010504@est.fib.upc.es> Date: Thu, 18 Sep 2003 22:26:48 +0200 From: =?ISO-8859-1?Q?Gustavo_P=E9rez?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: varchar too long strange problem X-MIMETrack: Itemize by SMTP Server on Ackerman/UPC(Release 5.0.9 |November 16, 2001) at 18/09/2003 22:15:29, Serialize by Router on Ackerman/UPC(Release 5.0.9 |November 16, 2001) at 18/09/2003 22:45:35 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/318 X-Sequence-Number: 10406 Hi, Looks like problems are following me . I'm having more problems restoring a database. That database was a part of a final studies, and right now I have to admin it. The problem now is that when I dump a relation with (which inherits from another) : /pg_dump prova -C -bv -f prova.dump -U psql -Ft (and custom '-Fc' format used too) and then restore a certain relation, the process of restoration vanishes with the following message : pg_restore: [archiver (db)] could not execute query: ERROR: value too long for type character varying(10) Checking the tables in the catalog, I found three fields which are defined as varchar(10), so I performed the following query in the psql client : SELECT length(field) FROM table; That shows me that no field has more than 10 characters. So while burning my eyes in front of the screen I thoguh about codification problems. I checked the codification of the database by using the psql-command : \l, which shows that the original database is using SQL_ASCII. So I tryed to create a brand new database like : /usr/bin/createdb -U postgres -T template0 -E SQL_ASCII prova1 and then tryed to restore it : pg_restore -v -Ft -U psql -d prova1 prova.dump Could it be a locale problem ? I don't think so, just because I'm using tar/custom format. Moreover I'm restoring the DB in the same machine where I created it, so these reasons make think that no non-unix characters may be added. I'm thinking of copying the entire table to a new with : SELECT * into new_table FROM old_table; and then creating a view called old_table (in order to keep working all the applications). But this is (IMHO) not a nice solution, just because I'd like to know the reason of the problem. May anyone help me with this ? I'll be very gratefully. Thanks in advance, Gustavo P=E9rez