Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 5C5931337B61 for ; Wed, 24 Nov 2010 09:28:13 -0400 (AST) 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 97632-10 for ; Wed, 24 Nov 2010 13:28:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og118.obsmtp.com (exprod7og118.obsmtp.com [64.18.2.8]) by mail.postgresql.org (Postfix) with SMTP id 678ED1337B4E for ; Wed, 24 Nov 2010 09:28:05 -0400 (AST) Received: from source ([209.85.215.50]) by exprod7ob118.postini.com ([64.18.6.12]) with SMTP ID DSNKTO0S5aoGMoMQ2HFm5Q8MS6WzRkXtuk3J@postini.com; Wed, 24 Nov 2010 05:28:06 PST Received: by ewy7 with SMTP id 7so5266290ewy.9 for ; Wed, 24 Nov 2010 05:28:04 -0800 (PST) Received: by 10.213.36.5 with SMTP id r5mr717859ebd.3.1290605284282; Wed, 24 Nov 2010 05:28:04 -0800 (PST) Received: from [192.168.1.183] (dsl-hkibrasgw2-ff7ac300-240.dhcp.inet.fi [88.195.122.240]) by mx.google.com with ESMTPS id x54sm6941507eeh.23.2010.11.24.05.28.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 24 Nov 2010 05:28:03 -0800 (PST) Message-ID: <4CED12E2.8030902@enterprisedb.com> Date: Wed, 24 Nov 2010 15:28:02 +0200 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.1.15) Gecko/20101030 Icedove/3.0.10 MIME-Version: 1.0 To: Cristiano CC: pgsql-bugs@postgresql.org Subject: Re: BUG #5765: pg_dump fail to find upper case table name References: <201011241134.oAOBY8YQ016066@wwwmaster.postgresql.org> In-Reply-To: <201011241134.oAOBY8YQ016066@wwwmaster.postgresql.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.2 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3 X-Spam-Level: X-Archive-Number: 201011/151 X-Sequence-Number: 28731 On 24.11.2010 13:34, Cristiano wrote: > pg_dump --host www --port 5432 --username postgres --format plain > --column-inserts --verbose --file "streetTypes.sql" --table > public."streetTypes" "geocoding-dev" > Password: > pg_dump: No matching tables were found > pg_dump: *** aborted because of error > > Test case: just create an table that need quoting. > CREATE TABLE "Test"() WITH ( OIDS=FALSE ); > > Call pg_dump to export. > > pg_dump --host localhost --port 5432 --username postgres --format plain > --column-inserts --verbose --file "test.sql" --table public."Test" "test-db" Manual says (at the bottom of http://www.postgresql.org/docs/8.4/static/app-pgdump.html): > To specify an upper-case or mixed-case name in -t and related switches, you need to double-quote the name; else it will be folded to lower case (see Patterns). But double quotes are special to the shell, so in turn they must be quoted. Thus, to dump a single table with a mixed-case name, you need something like > > $ pg_dump -t '"MixedCaseName"' mydb > mytab.sql -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com