How to find User Creation Date in the Greenplum
search cancel

How to find User Creation Date in the Greenplum

book

Article ID: 295812

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

This article describes how to find a role creation date.

 


Environment


Resolution

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)


Additional Information

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