Re: [HACKERS] whats the deal with -u ?

2007-12-11 Thread Kevin Grittner
On Sun, Dec 9, 2007 at 6:37 PM, in message [EMAIL PROTECTED], Alvaro Herrera [EMAIL PROTECTED] wrote: 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? I occasionally find it useful for situations where I have a

Re: [HACKERS] whats the deal with -u ?

2007-12-10 Thread Peter Eisentraut
Am Montag, 10. Dezember 2007 schrieb Tom Lane: Joshua D. Drake [EMAIL PROTECTED] writes: As I recall there was a bug under very specific circumstances that a password prompt would not appear. Thus we added the option for -W. I don't see any evidence for that theory in the CVS logs .. Peter

Re: [HACKERS] whats the deal with -u ?

2007-12-10 Thread Stephen Frost
* Peter Eisentraut ([EMAIL PROTECTED]) wrote: So as far as I can tell, the available options -U and -W serve all the existing use cases. I would have no issue with getting rid of the -W option if someone wants to take responsibility for ensuring that it will really never be necessary. I

Re: [HACKERS] whats the deal with -u ?

2007-12-10 Thread Tom Lane
Stephen Frost [EMAIL PROTECTED] writes: * Peter Eisentraut ([EMAIL PROTECTED]) wrote: So as far as I can tell, the available options -U and -W serve all the existing use cases. I would have no issue with getting rid of the -W option if someone wants to take responsibility for ensuring that

Re: [HACKERS] whats the deal with -u ?

2007-12-10 Thread Stephen Frost
* Tom Lane ([EMAIL PROTECTED]) wrote: However, I think we should either get rid of -u or find a way to un-deprecate it. Right now, it's undocumented and as far as I can see the main effect of having it is to cause confusion such as that which started this thread. On the whole I'm in favor

Re: [HACKERS] whats the deal with -u ?

2007-12-10 Thread Tom Lane
Stephen Frost [EMAIL PROTECTED] writes: * Tom Lane ([EMAIL PROTECTED]) wrote: However, I think we should either get rid of -u or find a way to un-deprecate it. Right now, it's undocumented and as far as I can see the main effect of having it is to cause confusion such as that which started

Re: [HACKERS] whats the deal with -u ?

2007-12-10 Thread Robert Treat
On Monday 10 December 2007 10:16, Tom Lane wrote: Further down the road, those whose notion of intuitive was formed by mysql might lobby to have -u become an alternate spelling for -U, crontab, truss, sudo, ps, strace, top, etc... -- Robert Treat Build A Brighter LAMP :: Linux Apache

[HACKERS] whats the deal with -u ?

2007-12-09 Thread Robert Treat
[EMAIL PROTECTED]:~$ ~rob/devel/postgresql/83/bin/psql -h localhost -u rob -p 5483] psql: Warning: The -u option is deprecated. Use -U. User name: rob Password for user : Welcome to psql 8.3beta2, the PostgreSQL interactive terminal. 1) I don't recall why -u was ever deprecated (and honestly

Re: [HACKERS] whats the deal with -u ?

2007-12-09 Thread Joshua D. Drake
Robert Treat wrote: [EMAIL PROTECTED]:~$ ~rob/devel/postgresql/83/bin/psql -h localhost -u rob -p 5483] psql: Warning: The -u option is deprecated. Use -U. User name: rob Password for user : Welcome to psql 8.3beta2, the PostgreSQL interactive terminal. 1) I don't recall why -u was ever

Re: [HACKERS] whats the deal with -u ?

2007-12-09 Thread Tom Lane
Robert Treat [EMAIL PROTECTED] 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.

Re: [HACKERS] whats the deal with -u ?

2007-12-09 Thread Robert Treat
On Sunday 09 December 2007 13:33, Tom Lane wrote: Robert Treat [EMAIL PROTECTED] 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

Re: [HACKERS] whats the deal with -u ?

2007-12-09 Thread Tom Lane
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,

Re: [HACKERS] whats the deal with -u ?

2007-12-09 Thread Tom Lane
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,

Re: [HACKERS] whats the deal with -u ?

2007-12-09 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: I don't remember why it's deprecated. The manual explains it: -u Forces psql to prompt for the user name and password before connecting to the database. This option is deprecated, as it is conceptually flawed. (Prompting for a non-default

Re: [HACKERS] whats the deal with -u ?

2007-12-09 Thread Tom Lane
Gregory Stark [EMAIL PROTECTED] writes: Tom Lane [EMAIL PROTECTED] 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

Re: [HACKERS] whats the deal with -u ?

2007-12-09 Thread Alvaro Herrera
Tom Lane wrote: Gregory Stark [EMAIL PROTECTED] writes: 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.)

Re: [HACKERS] whats the deal with -u ?

2007-12-09 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] 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

Re: [HACKERS] whats the deal with -u ?

2007-12-09 Thread Joshua D. Drake
Alvaro Herrera wrote: Tom Lane wrote: Gregory Stark [EMAIL PROTECTED] writes: 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

Re: [HACKERS] whats the deal with -u ?

2007-12-09 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: Alvaro Herrera [EMAIL PROTECTED] 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 ---

Re: [HACKERS] whats the deal with -u ?

2007-12-09 Thread Alvaro Herrera
Gregory Stark wrote: Tom Lane [EMAIL PROTECTED] writes: Alvaro Herrera [EMAIL PROTECTED] 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

Re: [HACKERS] whats the deal with -u ?

2007-12-09 Thread Tom Lane
Joshua D. Drake [EMAIL PROTECTED] writes: As I recall there was a bug under very specific circumstances that a password prompt would not appear. Thus we added the option for -W. I don't see any evidence for that theory in the CVS logs .. Peter seems to have invented -W out of whole cloth.