Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TY5ZV-0000Uy-72 for pgsql-docs@postgresql.org; Tue, 13 Nov 2012 01:45:49 +0000 Received: from mail-oa0-f46.google.com ([209.85.219.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TY5ZS-0002dj-Vy for pgsql-docs@postgresql.org; Tue, 13 Nov 2012 01:45:48 +0000 Received: by mail-oa0-f46.google.com with SMTP id h16so6936825oag.19 for ; Mon, 12 Nov 2012 17:45:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=Owh51+X9CA6Nw3MR/PU1uGb8HQ6Gmz02zHBfwZ3nISQ=; b=cpTXTnN6A5I2FyTFVpGEP6MVG+pYaM95Mjv6QLudAG+P1NodJkpQw+jQarinQNsJE3 mUsoxlN8c/GQED7HDzIljFtftojGyQJLpaOl/OP1S0XlPupElLd3Z7fXT+1YX8T+csVJ wQJ/3V186d2/Z6zPyav2e6L/8l4B3ptXjkuQRNfWojWavsjiBbyeqC5bt1uimUEFQ5ka eQrzP2TeQMmXgaNWXwnmDnrCdJjk2Kjg6F8A3naljKXzkZrrQLh/eESmf3rZjruE/36I gi+2Ya3ecANC0v71i0EO1MpoY9Ah5DKBZBUpKsOT6vWUtOfnkMZgzfrEzq0XugiFW8AO NV2w== Received: by 10.182.31.50 with SMTP id x18mr16447471obh.56.1352771145642; Mon, 12 Nov 2012 17:45:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.60.13.196 with HTTP; Mon, 12 Nov 2012 17:45:05 -0800 (PST) From: Mike Toews Date: Tue, 13 Nov 2012 14:45:05 +1300 Message-ID: Subject: pg_dump -t '"Table"' for cmd.exe To: pgsql-docs@postgresql.org Content-Type: multipart/alternative; boundary=14dae93b56d499331404ce569378 X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201211/8 X-Sequence-Number: 7500 --14dae93b56d499331404ce569378 Content-Type: text/plain; charset=ISO-8859-1 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 --14dae93b56d499331404ce569378 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I'm not sure if this is worth documenting, but pg_dumpin= g mixed-case tables with the '-t table' option appears to not be ac= curately documented for=A0cmd.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" &q= uot;My Database"
pg_dump: No matching tables were found

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"<= /div>

works!

-Mike
--14dae93b56d499331404ce569378--