Time to get rid of PQnoPasswordSupplied?

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Time to get rid of PQnoPasswordSupplied?
Date: 2015-06-15 03:34:59
Message-ID: CAMsr+YEWG22T6fGFc_9dPpcYRL13-h7AsUymzbzYFj0RgC35Og@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2015-06-15 03:44:55 Re: Moving Pivotal's Greenplum work upstream
Previous Message Pavel Stehule 2015-06-15 03:13:51 Re: creating extension including dependencies