pgsql: Fix incorrect error message reported for non-existent users

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix incorrect error message reported for non-existent users
Date: 2013-12-18 17:16:58
Message-ID: E1VtKjy-0003DD-8f@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix incorrect error message reported for non-existent users

Previously, lookups of non-existent user names could return "Success";
it will now return "User does not exist" by resetting errno. This also
centralizes the user name lookup code in libpgport.

Report and analysis by Nicolas Marchildon; patch by me

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/613c6d26bd42dd8c2dd0664315be9551475b8864

Modified Files
--------------
contrib/pg_upgrade/util.c | 23 ++++--------
src/backend/libpq/auth.c | 15 ++++----
src/backend/main/main.c | 37 +------------------
src/bin/initdb/initdb.c | 37 +++----------------
src/bin/psql/command.c | 5 ++-
src/bin/psql/help.c | 24 ++----------
src/bin/scripts/clusterdb.c | 2 +-
src/bin/scripts/common.c | 33 -----------------
src/bin/scripts/common.h | 2 -
src/bin/scripts/createdb.c | 2 +-
src/bin/scripts/createlang.c | 2 +-
src/bin/scripts/createuser.c | 2 +-
src/bin/scripts/droplang.c | 2 +-
src/bin/scripts/reindexdb.c | 4 +-
src/bin/scripts/vacuumdb.c | 2 +-
src/include/port.h | 4 ++
src/port/Makefile | 2 +-
src/port/username.c | 84 ++++++++++++++++++++++++++++++++++++++++++
src/tools/msvc/Mkvcbuild.pm | 4 +-
19 files changed, 129 insertions(+), 157 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2013-12-18 18:30:40 pgsql: Allow on-detach callbacks for dynamic shared memory segments.
Previous Message Alvaro Herrera 2013-12-18 16:49:52 pgsql: Don't ignore tuple locks propagated by our updates