Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UtjEV-0005st-QK for pgsql-docs@arkaria.postgresql.org; Mon, 01 Jul 2013 18:53:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1UtjEV-0001er-3h for pgsql-docs@arkaria.postgresql.org; Mon, 01 Jul 2013 18:53:51 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UtjES-0001aU-EL for pgsql-docs@postgresql.org; Mon, 01 Jul 2013 18:53:48 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UtjEL-0006Ip-K0 for pgsql-docs@postgresql.org; Mon, 01 Jul 2013 18:53:47 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1UtjEL-00073D-3G; Mon, 01 Jul 2013 14:53:41 -0400 Date: Mon, 1 Jul 2013 14:53:41 -0400 From: Bruce Momjian To: Mike Toews Cc: pgsql-docs@postgresql.org Subject: Re: pg_dump -t '"Table"' for cmd.exe Message-ID: <20130701185341.GF16348@momjian.us> References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="qcHopEYAB45HaUaB" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: 0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --qcHopEYAB45HaUaB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Nov 13, 2012 at 02:45:05PM +1300, Mike Toews wrote: > I'm not sure if this is worth documenting, but pg_dumping mixed-case tables > with the '-t table' option appears to not be accurately documented for cmd.exe. > Here are my four attempts, with only the last as success: > > Intuitive (supplying "My Table" like "My Database"), but not correct: > C:\>"C:\Program Files\PostgreSQL\9.1\bin\pg_dump.exe" -U postgres -t "My Table" > "My Database" > pg_dump: No matching tables were found > > As documented in last example at http://www.postgresql.org/docs/9.1/static/ > app-pgdump.html > C:\>"C:\Program Files\PostgreSQL\9.1\bin\pg_dump.exe" -U postgres -t '"My > Table"' "My Database" > pg_dump: No matching tables were found > > Escaping quotes, but using single quotes: > C:\>"C:\Program Files\PostgreSQL\9.1\bin\pg_dump.exe" -U postgres -t '\"My > Table\"' "My Database" > pg_dump: too many command-line arguments (first is "My Database") > > Escaping quotes, but using double quotes: > C:\>"C:\Program Files\PostgreSQL\9.1\bin\pg_dump.exe" -U postgres -t "\"My > Table\"" "My Database" > > works! Good point. Docs updated with attached patch, and patched to 9.3 beta as well. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + --qcHopEYAB45HaUaB Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="quote.diff" diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml new file mode 100644 index 2b5e95b..1ed5e4f *** a/doc/src/sgml/ref/pg_dump.sgml --- b/doc/src/sgml/ref/pg_dump.sgml *************** CREATE DATABASE foo WITH TEMPLATE templa *** 1224,1230 **** like ! $ pg_dump -t '"MixedCaseName"' mydb > mytab.sql --- 1224,1230 ---- like ! $ pg_dump -t "\"MixedCaseName\"" mydb > mytab.sql --qcHopEYAB45HaUaB Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs --qcHopEYAB45HaUaB--