pg_dump -t '"Table"' for cmd.exe

From: Mike Toews <mwtoews(at)gmail(dot)com>
To: pgsql-docs(at)postgresql(dot)org
Subject: pg_dump -t '"Table"' for cmd.exe
Date: 2012-11-13 01:45:05
Message-ID: CAM2FmMo5YbxtAa_ZQhP99NqHod=UUyfXoCLrio2DJ344Wb81kQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

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!

-Mike

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Craig Ringer 2012-11-13 23:15:21 Add contrib module functions to docs' function index
Previous Message Louis-Claude Canon 2012-11-11 20:52:52 Incomplete compatibility information for triggers