Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TYTyq-0006HI-Q8 for pgsql-docs@postgresql.org; Wed, 14 Nov 2012 03:49:36 +0000 Received: from mail-ob0-f172.google.com ([209.85.214.172]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TYTyo-0003Bt-G9 for pgsql-docs@postgresql.org; Wed, 14 Nov 2012 03:49:36 +0000 Received: by mail-ob0-f172.google.com with SMTP id ef5so451obb.31 for ; Tue, 13 Nov 2012 19:49:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=phdfbWQFiH7YZdy2bJGFEee2bilgusSObkQHtpT+Wro=; b=Fqt0GW4jwKKVrz6f0xBVZ7svGRIgO/HGMClIU/7HWlsTfT8hgMxFSgeX7ik+lExgVB 4XniaB3sYP32d3M+ZzFEpLS7NV8Wp9SX12zzHZGmk72bRdBkBeVWIIaVKQbmgwM2/jMy 9vOmCTVXCHPy3lNAY7IWHnK5mB04d7ozbMmlY9uKDanEM+hkLXhP9cK+FrY/yOU0j5US VsodW4LmpdKTQaMmQzbmAGbQGYNSaXcfZbZDVVfVbHgx1nTtIjkYV5h6wotGkH5zUcdh Hd2IoSNPOYaSTlFHTQmmtdMbABEFU9ypG+QF1wESisMA12ysOpxtXRU/vmBxucTH13nA InZw== Received: by 10.60.12.225 with SMTP id b1mr19389951oec.96.1352864973059; Tue, 13 Nov 2012 19:49:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.60.79.130 with HTTP; Tue, 13 Nov 2012 19:49:12 -0800 (PST) In-Reply-To: References: From: Josh Kupershmidt Date: Tue, 13 Nov 2012 22:49:12 -0500 Message-ID: Subject: Re: pg_dump -t '"Table"' for cmd.exe To: Mike Toews Cc: pgsql-docs@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201211/9 X-Sequence-Number: 7501 On Mon, Nov 12, 2012 at 8:45 PM, Mike Toews wrote: > 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: I believe this complaint is basically the same as this recent one: http://archives.postgresql.org/pgsql-bugs/2012-10/msg00044.php and this behavior confused me recently as well. I agree the behavior should be documented, though it should be documented for all our utilities which accept a --table argument and pass it on as a supposedly already-escaped identifier. Incidentally, I'm really not fond of the existing behavior because it: a.) is counterintuitive b.) requires the user to escape table names themselves, and how were they even supposed to have a chance of programmatically doing this properly before we exposed PQescapeIdentifier() c.) opens possible SQL injection holes, e.g. reindexdb --table='foo; ALTER ROLE limited WITH superuser' Josh