Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 724CDB5DCF6 for ; Tue, 24 May 2011 23:07:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 93248-01-4 for ; Wed, 25 May 2011 02:07:25 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [173.230.139.50]) by mail.postgresql.org (Postfix) with ESMTP id 3F157B5DC65 for ; Tue, 24 May 2011 23:07:10 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by www.postnewspapers.com.au (Postfix) with ESMTP id 5E4452D; Tue, 24 May 2011 22:07:10 -0400 (EDT) X-Virus-Scanned: amavisd-new at postnewspapers.com.au.com Received: from www.postnewspapers.com.au ([127.0.0.1]) by localhost (www.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id w8KS6v3ESUlJ; Tue, 24 May 2011 22:07:09 -0400 (EDT) Received: from mail.postnewspapers.com.au (ppp171-128.static.internode.on.net [150.101.171.128]) by www.postnewspapers.com.au (Postfix) with ESMTP id 3D8BA27; Tue, 24 May 2011 22:07:09 -0400 (EDT) Received: from [10.0.0.53] (wallace.localnet [10.0.0.53]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 2AEB8AEBA4; Wed, 25 May 2011 10:07:08 +0800 (WST) Message-ID: <4DDC644C.4050800@postnewspapers.com.au> Date: Wed, 25 May 2011 10:07:08 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110307 Thunderbird/3.1.9 MIME-Version: 1.0 To: manuel antonio ochoa CC: pgsql-sql@postgresql.org Subject: Re: Problems Pgdump References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/150 X-Sequence-Number: 35434 On 25/05/11 03:26, manuel antonio ochoa wrote: > sorry I cound finish my problem. > > I trying to get the next one : > > pg_dump -h 192.170.1.3 -U User --format custom --inserts --verbose > --file \"/root/Desktop/$name .backup\" --table "$ESQUEMA.$Nametable" DB" > > my Name table is detalle_Inegra , and the problem is that it table > alwals sent me a message like i COULD NOT FIND THE NAME OF TABLE but > the table exist and It's almost certainly a case-folding issue. It'd help if you posted the output of: \d in the database of interest. At a guess, what's happening is that you have a mixed-case table name. Let's say it's called "Fred". You're trying to run: pg_dump --table "Fred" dbname The shell consumes the double-quotes during argument processing, so what pg_dump actually sees is three arguments: --table Fred dbname Because of case-folding rules, table names that are not double-quoted are folded to lower-case. This means that the table names: Fred FRED fred FrEd are all interpreted as meaning the table "fred" (lower case). If you need to preserve case, you need to protect the double quotes from consumption by the shell, so you send the argument "Fred" to pg_dump. In your command line above, you would change --table "$ESQUEMA.$Nametable" to --table "\"$ESQUEMA\".\"$Nametable\"" ... adding a pair of escaped double-quotes around both the table and schema names that the shell does NOT consume. The outer double-quotes need to be retained in case the table or schema names contain shell meta-characters and/or spaces. To learn more about postgresql's case folding, see: http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS http://sql-info.de/postgresql/postgres-gotchas.html http://archives.postgresql.org/pgsql-hackers/2004-04/msg00818.php -- Craig Ringer