Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hElgR-0005HH-O7 for pgsql-general@arkaria.postgresql.org; Fri, 12 Apr 2019 02:12:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hElgQ-00053Z-Dd for pgsql-general@arkaria.postgresql.org; Fri, 12 Apr 2019 02:12:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hElgQ-0004zr-2u for pgsql-general@lists.postgresql.org; Fri, 12 Apr 2019 02:12:50 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hElgN-0006UQ-DC for pgsql-general@postgresql.org; Fri, 12 Apr 2019 02:12:49 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x3C2Cfdv021273; Thu, 11 Apr 2019 22:12:41 -0400 From: Tom Lane To: Ron cc: Forums postgresql Subject: Re: Trigger when user logs in In-reply-to: References: Comments: In-reply-to Ron message dated "Thu, 11 Apr 2019 20:00:00 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <21271.1555035161.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Thu, 11 Apr 2019 22:12:41 -0400 Message-ID: <21272.1555035161@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Ron writes: > PCI auditors have mandated that our databases (all running v9.6) send an > email when certain users log in.  Thus, I've been searching for how to do > this, but without much luck. PAM is the usual suggestion when you need off-the-beaten-path login behavior. regards, tom lane