Time to get rid of PQnoPasswordSupplied? - Mailing list pgsql-hackers

From Craig Ringer
Subject Time to get rid of PQnoPasswordSupplied?
Date
Msg-id CAMsr+YEWG22T6fGFc_9dPpcYRL13-h7AsUymzbzYFj0RgC35Og@mail.gmail.com
Whole thread Raw
Responses Re: Time to get rid of PQnoPasswordSupplied?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hi all

I frequently see users confused by one of our more common and less
clear error messages:
   fe_sendauth: no password supplied

What this really means is that the server requested a password for md5
or cleartext authentication but no password was supplied to the client
and it cannot prompt for one in this context.

I'd like to get rid of it. It's clear others have wanted to in the
past, since it's a backward compat #define in libpq-fe.h :

/* Error when no password was given. */
/* Note: depending on this is deprecated; use PQconnectionNeedsPassword(). */
#define PQnoPasswordSupplied    "fe_sendauth: no password supplied\n"

but given the git blame for it:

4f9bf7fc (Tom Lane           2007-12-09 19:01:40 +0000 493) /* Note:
depending on this is deprecated; use PQconnectionNeedsPassword(). */

88fd162e (Bruce Momjian      2004-10-16 03:10:17 +0000 494) #define
PQnoPasswordSupplied        "fe_sendauth: no password supplied\n"

I'm wondering if it's time for this to go away, so we can have a
decent error message for this common error. It's been deprecated for
eight years.

How about:

"The server requested a password but no password was supplied to the client"

?

I'm sure it can be better than that, but ... well, it's not
"fe_sendauth: no password supplied".


-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: creating extension including dependencies
Next
From: Craig Ringer
Date:
Subject: Re: Moving Pivotal's Greenplum work upstream