public inbox for [email protected]  
help / color / mirror / Atom feed
From: David Fetter <[email protected]>
To: Tom Lane <[email protected]>
Cc: Kevin Grittner <[email protected]>
Cc: [email protected]
Cc: PostgreSQL Patches <[email protected]>
Cc: PostgreSQL Docs <[email protected]>
Subject: Re: [HACKERS] pg_dump -t broken for mixed case table names in beta3?
Date: Tue, 28 Nov 2006 14:51:09 -0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>

On Tue, Nov 28, 2006 at 02:43:17PM -0500, Tom Lane wrote:
> "Kevin Grittner" <[email protected]> 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 <[email protected]> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666
                              Skype: davidfetter

Remember to vote!

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 ----
    </para>
  
    <para>
+    To dump a single table named <literal>camelCaseTable</>:
+ 
+ <screen>
+ <prompt>$</prompt> <userinput>pg_dump -t '"camelCaseTable"' mydb &gt; db.sql</userinput>
+ </screen>
+   </para>
+ 
+   <para>
     To dump all tables whose names start with <literal>emp</> in the
     <literal>detroit</> schema, except for the table named
     <literal>employee_log</literal>:


Attachments:

  [text/plain] pg_dump_camel_case_example.patch (800B, 2-pg_dump_camel_case_example.patch)
  download | inline diff:
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 ----
    </para>
  
    <para>
+    To dump a single table named <literal>camelCaseTable</>:
+ 
+ <screen>
+ <prompt>$</prompt> <userinput>pg_dump -t '"camelCaseTable"' mydb &gt; db.sql</userinput>
+ </screen>
+   </para>
+ 
+   <para>
     To dump all tables whose names start with <literal>emp</> in the
     <literal>detroit</> schema, except for the table named
     <literal>employee_log</literal>:


view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: [HACKERS] pg_dump -t broken for mixed case table names in beta3?
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox