Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id DE0C99FB1CF; Tue, 28 Nov 2006 18:51:15 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 17324-10; Tue, 28 Nov 2006 18:51:01 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from fetter.org (start.fetter.org [66.92.188.65]) by postgresql.org (Postfix) with ESMTP id 7AF849FB1CE; Tue, 28 Nov 2006 18:51:10 -0400 (AST) Received: by fetter.org (Postfix, from userid 500) id 1D772F3CE4F; Tue, 28 Nov 2006 14:51:09 -0800 (PST) Date: Tue, 28 Nov 2006 14:51:09 -0800 From: David Fetter To: Tom Lane Cc: Kevin Grittner , pgsql-hackers@postgresql.org, PostgreSQL Patches , PostgreSQL Docs Subject: Re: [HACKERS] pg_dump -t broken for mixed case table names in beta3? Message-ID: <20061128225109.GA5713@fetter.org> References: <456C395A.EE98.0025.0@wicourts.gov> <5470.1164742997@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="AhhlLboLdkugWU4S" Content-Disposition: inline In-Reply-To: <5470.1164742997@sss.pgh.pa.us> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/87 X-Sequence-Number: 3921 --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Nov 28, 2006 at 02:43:17PM -0500, Tom Lane wrote: > "Kevin Grittner" writes: > > Unless I'm missing something, pg_dump is not allowing selective dump of > > a table where the table name is mixed case. > > You do it like this: > > $ pg_dump -s -t '"DbTranLogRecord"' dtr > > A bit ugly but the conflict between shell and SQL quoting rules > sometimes forces us into compromises :-( > > Perhaps it's worth having an example for this in the pg_dump man page? Please find enclosed a patch which adds this :) Cheers, D -- David Fetter http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote! --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pg_dump_camel_case_example.patch" Index: doc/src/sgml/ref/pg_dump.sgml =================================================================== RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v retrieving revision 1.91 diff -c -r1.91 pg_dump.sgml *** doc/src/sgml/ref/pg_dump.sgml 23 Oct 2006 18:10:32 -0000 1.91 --- doc/src/sgml/ref/pg_dump.sgml 28 Nov 2006 22:50:15 -0000 *************** *** 805,810 **** --- 805,818 ---- + To dump a single table named camelCaseTable: + + + $ pg_dump -t '"camelCaseTable"' mydb > db.sql + + + + To dump all tables whose names start with emp in the detroit schema, except for the table named employee_log: --AhhlLboLdkugWU4S--