public inbox for [email protected]  
help / color / mirror / Atom feed
From: Mike Toews <[email protected]>
To: [email protected]
Subject: pg_dump -t '"Table"' for cmd.exe
Date: Tue, 13 Nov 2012 14:45:05 +1300
Message-ID: <CAM2FmMo5YbxtAa_ZQhP99NqHod=UUyfXoCLrio2DJ344Wb81kQ@mail.gmail.com> (raw)

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


view thread (3+ 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]
  Subject: Re: pg_dump -t '"Table"' for cmd.exe
  In-Reply-To: <CAM2FmMo5YbxtAa_ZQhP99NqHod=UUyfXoCLrio2DJ344Wb81kQ@mail.gmail.com>

* 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