Subject: How to check for valid user?

From: [email-masked] (Leif Neve)
Date: Thu, 18 Mar 93 13:49:30 -0800

Folks,

What is the correct way to have a libpq application check whether
it is being run by a valid database user?

I currently just start up a transaction block (PQexec("begin")) and
check the return code. Unfortunately, that produces the following
warning to stdout when an invalid user is involved:

    FATAL 1:Mar 18 16:45:36:User foo is not in pg_user

I'd really like to avoid that message if possible.

Any ideas?

Leif