Group: pgsql.hackers


Subject: whats the deal with -u ?
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 12/9/2007 1:33:15 PM
Robert Treat <xzilla@users.sourceforge.net> writes: > 1) I don't recall why -u was ever deprecated (and honestly postgresql is the > only program I know which uses -U rather than -u) but maybe we should revert > to -u and deprecate -U instread? You appear to think that -u and -U are supposed to be equivalent. You are incorrect. -u forces prompts for username and password. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster

Subject: whats the deal with -u ?
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 12/9/2007 2:10:29 PM
I don't remember why it's deprecated. These days it seems to use the same prompting mechanism as we use for passwords, so hopefully there is no security risk. Maybe it should be un-deprecated? I'd tend to take out the forced password prompt if we did, though. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly

Subject: whats the deal with -u ?
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 12/9/2007 2:34:08 PM
I wrote: > I don't remember why it's deprecated. Some trawling of the CVS logs shows that the deprecation notice was added by Peter here: 2000-01-14 17:18 petere * doc/src/sgml/ref/psql-ref.sgml, src/bin/psql/command.c, src/bin/psql/command.h, src/bin/psql/common.c, src/bin/psql/common.h, src/bin/psql/copy.c, src/bin/psql/copy.h, src/bin/psql/describe.c, src/bin/psql/describe.h, src/bin/psql/help.c, src/bin/psql/help.h, src/bin/psql/input.c, src/bin/psql/input.h, src/bin/psql/large_obj.c, src/bin/psql/large_obj.h, src/bin/psql/mainloop.c, src/bin/psql/mainloop.h, src/bin/psql/prompt.c, src/bin/psql/prompt.h, src/bin/psql/settings.h, src/bin/psql/startup.c: Fixed psql variables vs array syntax, as well as minor psql enhancements but I failed to find any discussion about the reason in the archives. Peter? regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend

Subject: whats the deal with -u ?
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 12/9/2007 7:19:35 PM
Gregory Stark <stark@enterprisedb.com> writes: > "Tom Lane" <tgl@sss.pgh.pa.us> writes: >> I don't remember why it's deprecated. > The manual explains it: > This option is deprecated, as it is conceptually flawed. (Prompting for a > non-default user name and prompting for a password because the server > requires it are really two different things.) You are encouraged to look > at the -U and -W options instead. Hmm. The point about the forced password prompt is certainly valid, but I see nothing wrong with the idea of having an option to prompt for the username. What if we just took out the forced password prompt, on the grounds that you can get that with "-u -W" if you want it? regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly

Subject: whats the deal with -u ?
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 12/9/2007 7:46:29 PM
Alvaro Herrera <alvherre@alvh.no-ip.org> writes: > I have never understood what's the point of having an option to force a > password prompt. I wonder why don't we deprecate -W? It's not *completely* useless, because you only need one connection attempt not two --- normally, psql gets rejected once before figuring out that it must ask for a password. You can imagine scenarios with slow internet connections, or a badly overloaded database, where it might be worth the keystrokes to type -W. OTOH, you can also avoid the two-attempts syndrome with a ~/.pgpass file. On balance I'm not for deprecating it, but pointing out that it's normally useless doesn't seem out of line... regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate