Pivotal Knowledge Base

Follow

How to find User Creation Date in the Greenplum

Environment

  • Pivotal Greenplum (GPDB) 4.3.x
  • Operating System- Red Hat Enterprise Linux 6.x

Purpose

This article describes how to find a role creation date.

Procedure

In order to find out when a role had been created, issue the following SQL query:

gpadmin=# SELECT rolname,actionname,TO_CHAR(statime, 'DD-MM-YYYY HH24:MI:SS') AS "action date" from pg_roles AS r LEFT JOIN pg_stat_operations AS o ON r.oid=o.objid WHERE actionname='CREATE' AND rolname = 'gpmon';
 rolname | actionname |     action date
---------+------------+---------------------
 gpmon   | CREATE     | 24-10-2016 03:18:34
(1 row)

 

Comments

Powered by Zendesk