Thread: pg_dump -t and mixed case table names

pg_dump -t and mixed case table names

From
Tina Messmann
Date:
hello List,
i have a cuple of tables with mixed cased names.
I want to dump the schema from these tables (not from the whole database)
with pg_dump, but it's not working for me :(

Example:

test=# \d "TestTable"
        Table "TestTable"
Column |     Type      | Modifiers
--------+---------------+-----------
id     | integer       |
name   | character(10) |

Now i want to dump the schema from only this table:
postgres@trill:~$ pg_dump -s -t "TestTable" test
--
-- Selected TOC Entries:
--
postgres@trill:~$

Is it impossible to dump a table whose name is mixed cased with the -t
option?
Do i have to rename the table to lower case names to do this?
Why can i create a table with a mixed case name and then it is not
possible to dump it?
(with the -t option, when dumping the whole database, it's no problem)
Am i missing something?

My system: Debian Woody - postgresql 7.2.1 (debian package)

Regards
Tina










Re: pg_dump -t and mixed case table names

From
Tom Lane
Date:
Tina Messmann <tina.messmann@xinux.de> writes:
> postgres@trill:~$ pg_dump -s -t "TestTable" test

The shell ate your quote marks.  Try

pg_dump -s -t '"TestTable"' test

            regards, tom lane

Re: pg_dump -t and mixed case table names

From
Tina Messmann
Date:
Tom Lane wrote:

>Tina Messmann <tina.messmann@xinux.de> writes:
>
>>postgres@trill:~$ pg_dump -s -t "TestTable" test
>>
>
>The shell ate your quote marks.  Try
>
>pg_dump -s -t '"TestTable"' test
>
>            regards, tom lane
>
This works. Thank you.
tina