Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 9C6C7B5DBF0 for ; Thu, 8 Sep 2011 15:38:02 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 01317-02 for ; Thu, 8 Sep 2011 18:37:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 0C4D8B5DBE7 for ; Thu, 8 Sep 2011 15:37:51 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p88Ibis4026025; Thu, 8 Sep 2011 14:37:44 -0400 (EDT) To: Bruce Momjian cc: Alvaro Herrera , Susanne Ebrecht , Robert Haas , Grzegorz Szpetkowski , pgsql-docs Subject: Re: createuser/dropuser username In-reply-to: <201109081624.p88GO9x27859@momjian.us> References: <201109081624.p88GO9x27859@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Thu, 08 Sep 2011 12:24:09 -0400" Date: Thu, 08 Sep 2011 14:37:44 -0400 Message-ID: <26024.1315507064@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/34 X-Sequence-Number: 6955 Bruce Momjian writes: > Alvaro Herrera wrote: >> Excerpts from Bruce Momjian's message of jue sep 08 11:52:04 -0300 2011: >>> I started going in that direction and stopped because of this example >>> in our docs: >>> vacuumdb --analyze --verbose --table 'foo(bar)' xyzzy >> Maybe do it unless there are parens. > OK, let me give that a try. I've been thinking more about this, and realized that there is one killer argument in favor of not auto-quoting, at least for arguments that represent table names: if we quote, there is no way to specify a schema-qualified name. I'm too lazy to troll the archives to verify this, but I am moderately sure that this point never came up in the original discussions where we concluded that auto-quoting command-line arguments was a good policy, because that was before we'd implemented schemas. So what I'm thinking right now is that we indeed should not auto-quote table- or index-name arguments. However, usernames and database names taken from the command line are still going to be auto-quoted, because that's how things work in connection requests. Is it going to be confusing that some things are quoted and some not? (Of course, any such change would be non-backwards-compatible and would have to be suitably documented and release-noted.) The backwards-compatible alternative would be to invent additional schema option arguments so that you could write something like "reindexdb --schema foo --table bar", but that seems pretty darn ugly. regards, tom lane