Re: createuser/dropuser username

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Susanne Ebrecht <susanne(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Grzegorz Szpetkowski <gszpetkowski(at)gmail(dot)com>, pgsql-docs <pgsql-docs(at)postgresql(dot)org>
Subject: Re: createuser/dropuser username
Date: 2011-09-09 23:48:22
Message-ID: 201109092348.p89NmMu12417@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> 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.

I have implemented what you suggested above, with improved wording.
Patch attached.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachment Content-Type Size
/rtmp/quote text/x-diff 6.2 KB

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2011-09-10 13:24:50 Re: ALTER TABLE doc small thing
Previous Message Shigehiro Honda 2011-09-09 13:34:25 typo on libpq.sgml