• Home
  • Services
    • DBA Support
    • DBA Consultancy Services
    • PostgreSQL Support
    • Website Maintenance
  • Courses

    About Courses

    • List Of Courses
    • Become an Instructor
    Greenplum Database

    Greenplum Database

    $2,000.00 $1,500.00
    Read More
  • Company
    • FAQs
    • About Us
    • Contact
  • Events
  • Portfolio
  • Blogs
    • Blog – RayaFeeL
    • Blog – PostgreSQL Support
    • Blog – PostgreSQL Migration
    • Blog – All DB’s
    • Blog – Linux
    • Blog – Medical Coding
      • Cart

        0

    Have any question?
    (+91)8838953252
    ITsupport@rayafeel.com
    RegisterLogin
    RayaFeeL
    • Home
    • Services
      • DBA Support
      • DBA Consultancy Services
      • PostgreSQL Support
      • Website Maintenance
    • Courses

      About Courses

      • List Of Courses
      • Become an Instructor
      Greenplum Database

      Greenplum Database

      $2,000.00 $1,500.00
      Read More
    • Company
      • FAQs
      • About Us
      • Contact
    • Events
    • Portfolio
    • Blogs
      • Blog – RayaFeeL
      • Blog – PostgreSQL Support
      • Blog – PostgreSQL Migration
      • Blog – All DB’s
      • Blog – Linux
      • Blog – Medical Coding
        • Cart

          0

      Blog

      • Home
      • Blog
      • Blog
      • PostgreSQL PG_SHADOW

      PostgreSQL PG_SHADOW

      • Posted by Nijamutheen J
      • Categories Blog
      • Date October 14, 2018
      • Comments 0 comment

      PG_SHADOW is views its contains information about rolename and user password,user password validity,user connection limit and  Role automatically inherits privileges of roles it is a member of,detailed information about user and privilege management.

      Name Type Description
      usename name User name
      usesysid oid ID of this user
      usecreatedb bool User can create databases
      usesuper bool User is a superuser
      usecatupd bool User can update system catalogs. (Even a superuser cannot do this unless this column is true.)
      passwd text Password (possibly encrypted); null if none. See pg_authid for details of how encrypted passwords are stored.
      valuntil abstime Password expiry time (only used for password authentication)
      useconfig text[] Session defaults for run-time configuration variables

      Examples

      –create the unencrypted user 

      create user u2 WITH UNENCRYPTED PASSWORD 'u2';

      –create the user with password validation time

      CREATE USER u3 WITH PASSWORD 'u3' VALID UNTIL '2017-06-06';

      –Describe the  PG_SHADOW view

      postgres=# \d  PG_SHADOW
        View "pg_catalog.pg_shadow"
         Column    |  Type   | Modifiers 
      -------------+---------+-----------
       usename     | name    | 
       usesysid    | oid     | 
       usecreatedb | boolean | 
       usesuper    | boolean | 
       usecatupd   | boolean | 
       userepl     | boolean | 
       passwd      | text    | 
       valuntil    | abstime | 
       useconfig   | text[]  |

      –list the user and show the users password and password validatation time

      postgres=# select usename,usesysid,passwd,valuntil,useconfig from PG_SHADOW;
       usename  | usesysid |               passwd                |        valuntil        | useconfig 
      ----------+----------+-------------------------------------+------------------------+-----------
       postgres |       10 | md505ea766c2bc9e19f34b66114ace97598 |                        | 
       rep      |    24576 | md5df2c887bcb2c49b903aa33bdbc5c2984 |                        | 
       u1       |    24583 |                                     |                        | 
       u2       |    24584 | u2                                  |                        | 
       u3       |    24585 | md5dad1ef51b879799793dc38d714b97063 | 2017-06-06 00:00:00-04 | 
       nijam    |    24586 |                                     |                        | 
      (6 rows)

      • Share:
      Admin bar avatar
      Nijamutheen J

      Nijamutheen J 7+ years of experience in PostgreSQL, Linux admin , web hosting - apache server , Oracle ,mySQL, Mriadb, vertica DB & Server security administrator

      My updated resume is https://www.tutorialdba.com/p/hi-i-have-4.html

      Previous post

      PostgreSQL PG_AUTHID system catalog VIEW
      October 14, 2018

      Next post

      How to connect the postgresql database automatically without password prompt ?
      November 2, 2018

      Leave A Reply Cancel reply

      You must be logged in to post a comment.

      Login with:

      Login with Google Login with Twitter Login with LinkedIn Login with Microsoft


      Search

      ADVERTISEMENT

      Latest Posts

      PostgreSQL Patching version 9, 10,11
      10Oct2019
      Tools for PostgreSQL
      16Sep2019
      Postgres user creation and restrict DDL & database access
      13Sep2019
      PostgreSQL SSL Setup
      07Sep2019
      How to DELETE current XLOG / WAL LOG in postgresql database ?
      19Aug2019

      Latest Courses

      PostgreSQL Database

      PostgreSQL Database

      $600.00 $500.00
      Greenplum Database

      Greenplum Database

      $2,000.00 $1,500.00

      Preview Course

      Free

      Recent Forum Topics

      • thought behind whiteboard activity
      • Are you going to take your first ste
      • How to start working on an application?
      • please let me know pre requirements to increase work_mem
      • how to copy some data in one table to another table in postgres

      2ndquadrant.in

      (+91) 8838953252

      ITsupport@rayafeel.com

      Company

      • About Us
      • Contact
      • Our Team
      • Blog

      COURSES

      • List Of Course
      • Become An Instructor
      • Events
      • Postgres Support Blog

      Support

      • DBA Support
      • Consultancy Services
      • Postgres Migration Blogs
      • Forum

      Recommend

      • Groups
      • Login
      • FAQs
      • SignUp

      IT Services by rayafeel.com. Powered by Rayafeel Technologies Pvt Ltd.

      • Privacy
      • Terms

      Become An Instructor?

      Join thousand of instructors and earn money hassle free!

      Get Started Now

      Login with:

      Login with Google Login with Twitter Login with LinkedIn Login with Microsoft

      Login with your site account

      Lost your password?

      Not a member yet? Register now

      Register a new account

      Are you a member? Login now