Return-Path: pg_adm@postgres.berkeley.edu
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA01054; Thu, 18 Mar 93 13:49:30 -0800
Date: Thu, 18 Mar 93 13:49:30 -0800
Message-Id: <9303182149.AA01054@postgres.Berkeley.EDU>
From: neve@nlm.nih.gov (Leif Neve)
Subject: How to check for valid user?
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu

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
